Duke_Quakem Report post Posted January 22, 2008 (edited) I want to show 4 charts on a same page, eah one in a different DIV. I have the Query running, and as far i can see, the XML is beign properly made using concatenation. The thing is I am using one method (imprimechart) to populate each chart (I use a string to see witch chart I am building). I think the code generating the XML is correct, but i still get the "chart" text on all DIVs. Here's the code on the aspx page < div style="z-index: 106; left: 56px; width: 250px; position: absolute; top: 88px; height: 250px" id="P1-P2"> < % = imprimeChart("P1-P2") %> < /div> < div style="z-index: 107; left: 320px; width: 250px; position: absolute; top: 88px; height: 250px" id="P2-P3"> < % = imprimeChart("P2-P3") %> < /div> < div id="P3-P4" style="z-index: 108; left: 56px; width: 250px; position: absolute; top: 352px; height: 250px"> < % = imprimeChart("P3-P4") %> < /div> < div id="P2-P5" style="z-index: 109; left: 320px; width: 250px; position: absolute; top: 352px; height: 250px"> < % = imprimeChart("P2-P5") %> < /div> and the CS code public string imprimeChart(string Div) { string dataXML = "< chart caption='" + Div + "' formatNumberScale='0'>"; int columna = 0,criterio = 0, buenos = 0, malos = 0; switch (Div) { case "P1-P2": columna = 2; criterio = 5; break; case "P2-P3": columna = 3; criterio = 17; break; case "P2-P4": columna = 4; criterio = 20; break; case "P2-P5": columna = 5; criterio = 25; break; } //ve cada fila de la columna elegida para el gr Edited January 22, 2008 by Guest Share this post Link to post Share on other sites
FusionCharts Support Report post Posted January 22, 2008 hi, It might be that you have not added/included FusionCharts.js script in <script> tag in the HTML - HEAD part of your aspx file. Share this post Link to post Share on other sites
Duke_Quakem Report post Posted January 25, 2008 Hi I checked the code but I do have the 'script language="JavaScript" src="FusionCharts/FusionCharts.js" /script' in the Head tag of the page. Also I checked with sample data to see if the problem could be the XML was sending charts with no data inside, but still I get the 'Chart' text on each Div... not even the 'no data to display' message. Share this post Link to post Share on other sites
Pallav Report post Posted January 25, 2008 Hi Can you please send the complete HTML output as attachment? Share this post Link to post Share on other sites
Duke_Quakem Report post Posted January 28, 2008 Sorry about the delay. Here's the asp and the cs code. Share this post Link to post Share on other sites
FusionCharts Support Report post Posted January 28, 2008 hi, I have a quick view of your code and i trapped some javascript errors. The div ids that you have defined are having '-' character which is not permissible in JavaScript. can you please replace the character with say, '_' and things will work. e.g. <div style="z-index: 106; left: 56px; width: 250px; position: absolute; top: 88px; height: 250px" id="P1_P2"> <% = imprimeChart("P1_P2") %> </div> Moreover, the size of the chart are bigger (600x300) than the container (250x250). Please set the size of the charts too: return FusionCharts.RenderChart("FusionCharts/Pie3D.swf", "", dataXML, Div, "250", "250", false, false); Share this post Link to post Share on other sites
Duke_Quakem Report post Posted January 29, 2008 (edited) I made the change on the DIV's IDs and voila! the charts worked wonderfully! I can't believe something that simple kept me stucked this long... better go hit some books 'bout javascript thanks for your help, you guys really rock ! Just a lttle concern. I don't know why the first chart loks normal while the others 3 the pie is a lot smaller than the first one... but they're visible... Edited January 29, 2008 by Guest Share this post Link to post Share on other sites
FusionCharts Support Report post Posted January 30, 2008 hi, can you just send us a screenshot of the page? Share this post Link to post Share on other sites
Duke_Quakem Report post Posted January 30, 2008 Here are the ss for the chars. As you can see, the problem appears on the 2D and 3D pie charts, while in the 2D Column (I haven't tested with the 3D column) you can't see a major size difference. Also, if you pay attention, the Pie charts seems to become smaller in the order they are plotted (it's more visible on the 2D pie rather than the 3D). Share this post Link to post Share on other sites
Pallav Report post Posted January 30, 2008 Hi, For the pie and doughnut charts, the size is determined by the empty space on chart (left after rendering labels). If you want to force your own size of the pie/doughnut, you can set: [ chart ... pieRadius='xx' ...] (xx in pixels) Share this post Link to post Share on other sites
Duke_Quakem Report post Posted January 31, 2008 I forced the size of the pie charts and that fixed the issue, thanks! Share this post Link to post Share on other sites