FusionFerro

Members
  • Content count

    15
  • Joined

  • Last visited

Everything posted by FusionFerro

  1. Hi there, I am trying to find an example to display a Fusion chart in an ASP:TABLE cell. For example, I have the following HTML: <asp:TableRow ID="TableRow2" runat="server"> <asp:TableCell> <asp:Table ID="CountrySection" runat="server"> </asp:Table> </asp:TableCell> <asp:TableCell> </asp:TableCell> <asp:TableCell> <asp:ListBox ID="lbAgreement" runat="server" onselectedindexchanged="lbAgreement_SelectedIndexChanged" onprerender="lbAgreement_PreRender" AutoPostBack="True" ForeColor="#006F5F" Width="180" Height="750" Font-Names="Calibri" Font-Size="14" > </asp:ListBox> </asp:TableCell> </asp:TableRow> and in my c# .net code I want to do something similar to: //new table row and cell TableRow r = new TableRow(); TableCell c = new TableCell(); //create chart object var myChart = new FusionCharts("../Charts/AngularGauge.swf", "myChartId", "400", "200", "0", "0"); myChart.setDataURL("../1stFusionChart/Data.xml"); //add chart to row cell "HERE IS WHERE I NEED HELP" r.Cells.Add(myChart ); // add row object to CountrySection table CountrySection.Rows.Add(r); but fail to pass the chart object to the cell I want to display the chart in Many thanks,
  2. Thanks a lot for the comprehensive response. It helped for sure. I just want to highlight that the dll worked after adding it to the GAC AND adding it to project references. It didn't work after adding to GAC alone (couldn't recognize InfoSoftGlobal unless the dll is added to project references) and I don't know why. So thank you very much.
  3. Thanks for the reply, I have been investigating the case and I have the following questions/observations: 1- it seems that the problem is in the way I am adding a reference to FusionChart.dll. I have this file in my vstudio project bin directory and I added it to project reference from that location. However, the application throws an exception: "+ ex {"Could not load file or assembly 'FusionCharts, Version=3.2.2.2, Culture=neutral, PublicKeyToken=58bb3098fe7f0ede' or one of its dependencies. The system cannot find the file specified.":"FusionCharts, Version=3.2.2.2, Culture=neutral, PublicKeyToken=58bb3098fe7f0ede"} System.Exception {System.IO.FileNotFoundException} " I am using the FusionCharts.dll from the evaluation version but I got the same problem even when I use the dll included in your sample (TableCellIssue.zip), I also noticed there is another file with the same name in addition to .refresh in the sample (although this file is just 1 K). 2- I also noticed that you are using the following two lines before the DrawGraphs method call to set the script and data language parameters, is this needed? FusionCharts.SetRenderer("javascript"); FusionCharts.SetDataFormat("json"); 3- Finally I also noticed that you are using the following line in the sample .aspx: <script type="text/javascript" src="Charts/JS/FusionCharts.js"></script> </asp:Content> and I understand that this is not needed as the application uses FusionCharts.dll instead of FusionCharts.js, am I correct? Kindly provide your support as I am stuck at this problem for 3 weeks now. Thanks,
  4. Hi there, I have several posts in this forum asking about tactical questions, however with time I learned that I have to start with a question about the best practice as I am not aware about FusionCharts capabilities with regard to the development technology I am using. My solution and used technology: I am developing Visual Studio C# 2010 project to create a report web page that has several buttons (each present a country) and a graph (column 3d showing countries versus balance) in the middle of the page. Each time the user clicks on one of the buttons, the graph filter changes and display the new results accordingly. The page loads the country buttons dynamically using C# code that connects with an Oracle DB (11g on Unix) to get the list of countries. The Country balance is also in Oracle DB. So basically I have a web page with a main table that looks like the following: <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="360MainScreenUserControl.ascx.cs" Inherits="_360Report._360MainScreen._360MainScreenUserControl" %> <%@ Register assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %> <asp:TableRow ID="TableRow2" runat="server"> <asp:TableCell> <asp:Table ID="CountrySection" runat="server"> </asp:Table> </asp:TableCell> <asp:TableCell> <asp:Table ID="GraphSection" runat="server"> </asp:Table> </asp:TableCell> <asp:TableCell> <asp:ListBox ID="lbAgreement" runat="server" onselectedindexchanged="lbAgreement_SelectedIndexChanged" onprerender="lbAgreement_PreRender" AutoPostBack="True" ForeColor="#006F5F" Width="180" Height="750" Font-Names="Calibri" Font-Size="14" > </asp:ListBox> </asp:TableCell> </asp:TableRow> each section (table) is filled by C# code that connects to Oracle. What I need is to use FusionChart to fill the GraphSection (show the graph in a table cell) and make it sensitive to user selection (when choosing any of the buttons that are dynamically created and shown in the CountrySection in the above code). Now my questions are: 1- What is the best practice or recommended approach? - Do I use the SharePoint collaboration to create my chart as a web part and then use it from the code to show this web part in the cell in GraphSection? - Or I should only work with FusionChart XT for .net and create and render to chart into the cell in GraphSection using C# code? 2- Following one of the practices above, how can I pass the parameters to the chart and refresh it? 3- The most important question: I am facing difficulties as I am trying both solutions and found no complete example. Can you please lead me to one. Many thanks,
  5. Hi there, I am new in using Fusion Charts and havent wrote java script since long. I am trying to get introduced to Fusion Charts and started with the bar example. It works fine as long as I am passing the swf and js files using relative paths "..l" or ".." but what if one or both files exist in a different root path or different network location? <html> <head> <title>FusionGadgets Chart Gallery</title> <script language="JavaScript" src="../FusionCharts.js"></script> </head> <body bgcolor="#ffffff"> <table width='98%' align='center' cellpadding='2' cellspacing='0'> <tr> <td align="center"> <div id="chartdiv" align="center">FusionGadgets</div> <script type="text/javascript"> var myChart = new FusionCharts("../Charts/realtimecolumn.swf", "myChartId", "270", "270", "0", "0"); myChart.setDataURL("mybar.xml"); myChart.render("chartdiv"); </script> </td> </tr> <tr height='10'> <td></td> </tr> <tr> </tr> </table> </body> </html> the above works fine but when I try to pass the swf file as full path: "E:/folder1/folder2/Charts/realtimecolumn.swf" instead it fails, same goes with the jr file when I try to pass it using full path: "d:/folder9/folder10/FusionCharts.js" Also would like to know the case when I want to pass the file path using network location Many thanks,
  6. Hi there, I have narrowed down the problem and it might be in the way I populate the Chart in to the asp:table cell. Now I can successfully show the chart in a div in the same page I want to display the same chart in an asp:table cell. The chart shows successfully in the div but doesn't show in the cell. A reminder: I am developing a V studio C# .NET project and deploying to SharePoint 2010. Following is my updated code: 1- MyASCX.ascx <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="360MainScreenUserControl.ascx.cs" Inherits="_360Report._360MainScreen._360MainScreenUserControl" %> <%@ Register assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %> <style type="text/css"> .wrap { white-space:normal; } </style> <asp:Table ID="MainTable" runat="server" Height="227px" Width="100%" style="margin-right: 38px"> <asp:TableRow ID="TableRow1" runat="server" Width="70%"> <asp:TableHeaderCell ColumnSpan="1"> </asp:TableHeaderCell> <asp:TableCell> <asp:Table ID="YearSection" runat="server"> </asp:Table> </asp:TableCell> </asp:TableRow> <asp:TableRow ID="TableRow2" runat="server"> <asp:TableCell> <asp:Table ID="CountrySection" runat="server"> </asp:Table> </asp:TableCell> <asp:TableCell> <asp:Table ID="GraphSection" runat="server"> </asp:Table> </asp:TableCell> <asp:TableCell> <asp:ListBox ID="lbAgreement" runat="server" onselectedindexchanged="lbAgreement_SelectedIndexChanged" onprerender="lbAgreement_PreRender" AutoPostBack="True" ForeColor="#006F5F" Width="180" Height="750" Font-Names="Calibri" Font-Size="14" > </asp:ListBox> </asp:TableCell> </asp:TableRow> </asp:Table> <html> <head> <title>My First chart using FusionCharts XT - Using pure JavaScript</title> <script type="text/javascript" src="/FusionCharts/FusionCharts.js"></script> </head> <body> <div id="chartContainer">FusionCharts XT will load here!</div> <script type="text/javascript"><!-- FusionCharts.setCurrentRenderer('javascript'); var myChart = new FusionCharts("/FusionCharts/Column2D.swf", "myChartId", "400", "300", "0"); myChart.setXMLUrl("/FusionCharts/Data.xml"); myChart.render("chartContainer"); // --> </script> </body> </html> 2- MyASCX.ascx.cs: protected override void OnLoad(EventArgs e) { try { DrawGraph(); } catch (Exception ex) { ShowMessage(this.Page+ " SourceOrg:OnLoad: "+ ex); } } //Draw Graph public void DrawGraph() { //new table row and cell TableRow r = new TableRow(); TableCell c = new TableCell(); //create chart object and add it to Graph section cell c.Text = FusionCharts.RenderChart("/FusionCharts/Column2D.swf", "/FusionCharts/Data.xml", "", "myChart1ID", "400", "200", false, true); r.Cells.Add(c); // add row object to table GraphSection.Rows.Add(r); } So I am using the same relative paths and the same data file and swf file in both cases, and I am using the same way you recommended to show the Chart in asp:table cell. Still the chart shows successfully in the div but fails in the table cell. Please provide your support, Thank
  7. Passing swf file using absolute path

    Thanks for the feedback, I feel really stuck in the relative path thing! I have my chart ready and working outside the project (as html) but I am not able to show it from the code. I noticed that you are asking me to deploy the solution on IIS, I am using SharePoint (so my project is a VStudio SharePoint C# project) and I don't deploy the solution manually to IIS, will I still need to place the FusionChart folder and files manually on IIS? Also as per my example, I am not using Literal control (actually in the real code I am using asp:table cell to show the chart inside) will this make any difference? (here is the link to another forum post that shows my code example: http://forum.fusioncharts.com/topic/15075-displaying-fusion-chart-in-asptable-cell-using-c-net/) Waiting for your response Thanks
  8. Passing swf file using absolute path

    Hi Haritha, right you are, your example works after modifying the browser settings. I think, due to my limited experience with relative path, I need your further support here. from my vstudio c# applicaton I tried to learn the root application directory by: HttpRuntime.AppDomainAppPath; and the return value was "C:\inetpub\wwwroot\wss\VirtualDirectories\80\" Also in case I should make my relative path with reference to the actual application location on my HDD: - MyApp.sln solution file is under c:\apps\myapp\MyApp.sln - MyApp.csproj project file is under c:\apps\myapp\myapp\MyApp.csproj Given this, 1- where should I place Fusion files on my HDD (swf, jr, and xml files) 2- what should be the relative path to use in my html file? Thanks,
  9. Passing swf file using absolute path

    Thank you for provided the attached example but unfortunately it doesnt work. Even the Demo.html file you provided doesnt show the chart. I had a successful trial when I used: "File///F:/Dev/Fusion/" but it works only when I write javascript in my html file but fails from within the code (vstudio with c#). kindly advice.
  10. Hi all, Thanks for your propmpt replies and support. I am trying to implement your example using Column3D.swf and Data.xml (same example provided on http://docs.fusioncharts.com/charts/contents/FirstChart/FirstChart.html). I using vstudio c# and deploying the solution to SharePoint 2010. I used your suggestions above and the rebuilding and deployment process goes fine but the chart is never shown on the screen. following is the code example: 1- MyASCX.ascx <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="360MainScreenUserControl.ascx.cs" Inherits="_360Report._360MainScreen._360MainScreenUserControl" %> <%@ Register assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %> <asp:TableRow ID="TableRow2" runat="server"> <asp:TableCell> <asp:Table ID="CountrySection" runat="server"> </asp:Table> </asp:TableCell> <asp:TableCell> <asp:Table ID="GraphSection" runat="server"> </asp:Table> </asp:TableCell> <asp:TableCell> <asp:ListBox ID="lbAgreement" runat="server" onselectedindexchanged="lbAgreement_SelectedIndexChanged" onprerender="lbAgreement_PreRender" AutoPostBack="True" ForeColor="#006F5F" Width="180" Height="750" Font-Names="Calibri" Font-Size="14" > </asp:ListBox> </asp:TableCell> </asp:TableRow> 2- MyASCX.ascx.cs: protected override void OnLoad(EventArgs e) { try { DrawGraph(); } catch (Exception ex) { ShowMessage(this.Page+ " SourceOrg:OnLoad: "+ ex); } } //Draw Graph public void DrawGraph() { //new table row and cell TableRow r = new TableRow(); TableCell c = new TableCell(); //create chart object and add it to Graph section cell c.Text = FusionCharts.RenderChart("file:AbsolutePath/Column3D.swf", "file:AbsolutePath/Data.xml", "", "myChart1ID", "400", "200", false, true); r.Cells.Add(c); // add row object to table GraphSection.Rows.Add(r); } 3- I am using Column3d.swf and the same Data.xml (same example provided on http://docs.fusioncharts.com/charts/contents/FirstChart/FirstChart.html) Many thanks,
  11. Thanks for the response, I am trying to implement the example you gave me but I am facing a problem in the definition of the function FunsionCharts (I need to add a VStudio reference and add a using library) and I dont find a dll file in the Fusion folder to use. Can you please help in this? Thanks,
  12. Hi All, I have a problem with one the Charts controls. All users use ie 8 and the page includs 4 Fusion charts. one of the chars doesnt appear with some users unless I moved the site to the list of intranet sites. I tired to compare the security settings of intranet sites to the settings of internet sites and made them identical with no luck. Also compared the advanced settings with the same result. Can you please help in this?
  13. Fusion Gadget Versus Browser Settings

    Dear Angshu, I already provided the error log from FireFox together with the statement pointed at in the log. Waiting for your support. Thanks,
  14. Fusion Gadget Versus Browser Settings

    And by the way, this is the code found in line 103 (span analysis error): <script type="text/javascript"> spananalysis.style.color = 'red'; </script> while this is the code found in line 111 for getElementById = null: var mval = document.getElementById("ctl00$ContentPlaceHolder1$txtInvestPct").value;
  15. Fusion Gadget Versus Browser Settings

    Thanks Angshu for your fast reply. Please find the error screenshot attached. I even verified it, when I give the value directly instead of getting element value by ID it works! Can you please tell me which setting is making this difference between normal internet sites and sites added as intranet sites?