rangelier Report post Posted August 2, 2010 (edited) Hello, I was wondering if someone could point me in the right direction. I'm working on a big project and i will need to use many charts, thats why i would like to build an re-useable UserControl. I've looked all over the internet but i can't find some good documentation to point me in right direction. Can somebody tell we were i can find some information or can someone explain to me where i should start? Looking forward to you replys best regards, Rob p.s. I would like to have something like this, if there is something better i also would like to know :-) <div id='<%# Eval("Id") %>'> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="900" height="300" id="Column3D"> <param name="movie" value='<%# Eval("Path")%>' /> <param name="FlashVars" value='&dataURL=<%# Eval("Data") %>&chartWidth=900&chartHeight=300'/> <param name="quality" value="high" /> <embed src='<%# Eval("Path") %>' flashvars='&dataURL=<%# Eval("Data") %>&chartWidth=900&chartHeight=300' quality="high" width="900" height="300" name="Column3D" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> </div> public string Id { get; set; } public string Path { get; set; } public string Data { get; set; } FusionChart chart = new FusionChart(); chart.Id = "testChart"; chart.Path = Constants.FusionCharts.MSColumn2D; chart.Data = Constants.FusionCharts.Data; ChartPlaceHolder.Controls.Add(chart); Edited August 2, 2010 by Guest Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted August 3, 2010 Hi, Welcome to FusionCharts forum. Could you please send us the project codes in a zip folder so that you might have an idea of your project and we could proceed accordingly? Please note, in case you wish to send us the code via forum, you can attach the same in this thread else you can also send us the same at [email protected] Awaiting your reply. Share this post Link to post Share on other sites
rangelier Report post Posted August 3, 2010 (edited) Hello, Thanks for you reply. I've send you an email to explain what i'm looking for. The thing is that i'm just starting on this project, so i'm looking for some solution to make my life easier. I just started at a new company and my job is to develop loads of website that use fusioncharts, thats why i'm looking for a solution that is easy to use and reuse in other projects. At my work the have developed a wrapper around fusioncharts to start make life easier, but i believe we can make it even more easier. The wrapper looks something like this: - Create a report (from, till, interval etc.) - Find best charttype to use, based on the report data - Write the ouput (XML) to another asp.net webform (Response.Write(FusionChartsExporter.GenerateChartXml(report, info)) - Databind output to properties I really hope you can give me some answers... best regards, Rob Edited August 3, 2010 by Guest Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted August 3, 2010 Hi, Could you please confirm us the address a to which you have sent us the code as we have not received it yet? Could you please resend the same at [email protected] ? Awaiting your reply. Share this post Link to post Share on other sites
rangelier Report post Posted August 3, 2010 (edited) hello, i almost got it working, but i'm doing something wrong. I have the following situation: 1 UserControl called FusionChart.ascx (this usercontrol has a couple of properties like: DataPath, FilePath etc.) <div id="<%= WrapperId %>"> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="<%= Width %>" height="<%= Height %>" id="<%= ObjectId %>"> <param name="movie" value="<%= FilePath %>" /> <param name="FlashVars" value="&dataURL=<%= DataPath %>&chartWidth=<%= Width %>&chartHeight=<%= Height %>"/> <param name="quality" value="high" /> <embed src="<%= FilePath %>" flashvars="&dataURL=<%= DataPath %>&chartWidth=<%= Width %>&chartHeight=<%= Height %>" quality="high" width="<%= Width %>" height="<%= Height %>" name="<%= EmbedId %>" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> </div> Now i would like to use this usercontrol in my webform, and because i need to charts i would like to add two, something like this: FusionChart chart = new FusionChart(); chart.WrapperId = "Chart"; chart.ObjectId = "testing"; chart.Width = 900; chart.Height = 400; chart.FilePath = "Charts/MSColumn2D.swf"; chart.DataPath = "data.xml"; UserControl uc = chart as UserControl; uc = (FusionChart)Page.LoadControl("FusionChart.ascx"); ChartPlaceHolder.Controls.Add(uc); this doesn't work obviously, can someone help me with this? I have referenced the UserControl in my webform Edited August 3, 2010 by Guest Share this post Link to post Share on other sites