STEW_ERI

Members
  • Content count

    9
  • Joined

  • Last visited

About STEW_ERI

  • Rank
    Forum Newbie
  1. Hi, I am using FusionCharts XT(v3.2.2) SR4 and here is the code snippet which generates one of the charts although to test you can just create a HTML page, which a text block at the top then a chart (width 100%) with some more text below it, then another chart (width 100%). Code Behind Code Function RenderAppAwardValue() As String 'Create Stringbuilder Dim xmlData As New StringBuilder() 'Generate the chart element xmlData.Append("<chart caption='Values (YTD)' bgAlpha='0,0' canvasBgAlpha='0' NumberPrefix='£' showBorder='0' formatNumberScale='1' rotatelabels='0' showvalues='1' connectNullData='1' showExportDataMenuItem='1' xAxisName='Academic Year' yAxisName='Value (£)' >") 'Set DataSet and Values Dim AppNumSeries As String = "SET DateFormat dmy ..." Dim RSAppN As New DbConn(AppNumSeries) While RSAppN.ReadData.Read() xmlData.Append(String.Format("<set label='Apps. 10/11' value='{0}' />", RSAppN.ReadData("OlderCount"))) xmlData.Append(String.Format("<set label='Apps. 11/12' value='{0}' />", RSAppN.ReadData("OldCount"))) xmlData.Append(String.Format("<set label='Apps. 12/13' value='{0}' />", RSAppN.ReadData("CurrentCount"))) End While RSAppN.ReadData.Close() 'Set DataSet and Values Dim AwardNumSeries As String = "SET DateFormat dmy ...." Dim RSAwardN As New DbConn(AwardNumSeries) While RSAwardN.ReadData.Read() xmlData.Append("<vLine color='FF5904' thickness='2' />") xmlData.Append(String.Format("<set label='Awards 10/11' value='{0}' />", RSAwardN.ReadData("YEARBEFORECOUNT"))) xmlData.Append(String.Format("<set label='Awards 11/12' value='{0}' />", RSAwardN.ReadData("LASTYEARCOUNT"))) xmlData.Append(String.Format("<set label='Awards 12/13' value='{0}' />", RSAwardN.ReadData("CURRENTYEARCOUNT"))) End While RSAwardN.ReadData.Close() xmlData.Append("</chart>") 'Create the chart - Multi-Series Line Chart with data from xmlData Return FusionCharts.RenderChart("Charts/Column2D.swf", "", xmlData.ToString(), "AppAwardValueChart", "100%", "200", False, True, True) End Function On the client side, there is an asp literal which loads the data returned from the above function. Although this is on an asp.net page, the current charts on a classic asp page and the process is the same, although the function is called for each chart. I have attached a PDF output from the pages to show you what I mean by the charts being squeezed. Stewart Example_PDF.pdf
  2. Hello FusionCharts! I currently have a report, which uses several FusionCharts as part of the reports. These are generated by code and show on the client side, at the moment using a width of 100%. Although the problem I am having is when I print them as PDF (using CutePDF or nativley in Chrome) they come out on the PDF and look like they have been squeezed, width wise. I cant post any pics due to the nature of the data, but hopefully you get what I mean. Is there a best practice for handling this type of print out, where the users are just selecting File > Print to PDF. For example setting a certain width for the charts or something, they are currently in a classic asp page. Thanks in advance for any help. Stewart
  3. Rednering Issues In Asp.net (Vb)

    Code is created in code-behind and set at the text to a liternal control. 'Create Stringbuilder Dim xmlData As New StringBuilder() 'Generate the chart element xmlData.Append("<chart caption='Application and Award Number (YTD)' bgAlpha='0,0' canvasBgAlpha='0' showBorder='0' formatNumberScale='1' rotatelabels='0' showvalues='1' connectNullData='1' showExportDataMenuItem='1' xAxisName='Academic Year' yAxisName='Number' >") 'Set DataSet and Values Dim AppNumSeries As String = "SET DateFormat dmy " AppNumSeries = AppNumSeries & "SELECT * FROM TABLE" Dim RSAppN As New DbConn(AppNumSeries) While RSAppN.ReadData.Read() xmlData.Append(String.Format("<set label='Apps. 09/10' value='{0}' />", RSAppN.ReadData("OlderCount"))) xmlData.Append(String.Format("<set label='Apps. 10/11' value='{0}' />", RSAppN.ReadData("OldCount"))) xmlData.Append(String.Format("<set label='Apps. 11/12' value='{0}' />", RSAppN.ReadData("CurrentCount"))) End While RSAppN.ReadData.Close() 'Set DataSet and Values Dim AwardNumSeries As String = "SET DateFormat dmy " AwardNumSeries = AwardNumSeries & "SELECT * FROM TABLEB" Dim RSAwardN As New DbConn(AwardNumSeries) While RSAwardN.ReadData.Read() xmlData.Append(String.Format("<set label='Awards 09/10' value='{0}' />", RSAwardN.ReadData("OlderCount"))) xmlData.Append(String.Format("<set label='Awards 10/11' value='{0}' />", RSAwardN.ReadData("OldCount"))) xmlData.Append(String.Format("<set label='Awards 11/12' value='{0}' />", RSAwardN.ReadData("CurrentCount"))) End While RSAwardN.ReadData.Close() xmlData.Append("</chart>") 'Create the chart - Multi-Series Line Chart with data from xmlData Return FusionCharts.RenderChart("Charts/Column3D.swf", "", xmlData.ToString(), "chartid", "100%", "250", False, True, True)
  4. Hello, I have just upgraded to the latest version of FusionCharts and they are currently not rendering correctly, the older version is still working without issue. The same happens if I set the charts to render using JavaScript as well. (See attached screen shots). Any ideas what might be causing this? Stewart
  5. Hello, I have been using FusionCharts for some time and have used some other components of FusionWidgets without any problems, although recently I attempted to setup a Gantt chart on the page, which would show the current progress of a project. I have added it to the page using the dataURL method and it will not load the chart, it just states "Error in Loading Data". The asp.net page which its located in is called "IT" and it has a sub-folder called "projects" where I want to store the xml files. For the purpose of getting it setup I downloaded the XML file used on the FusionWidgets documentation under Sample Charts > Gantt Chart > Development Lifecycle. I have even given full access to the folder in the hope that it was just a permissions issue and this has left me with the same problem. I have also tried going to the URL in Internet Explorer and it loads the XML data on the screen so not sure whats happening here, hopefully you can help? Head Section of Page: <script language="JavaScript" type="text/javascript" src="../Charts/FusionCharts.js"></script> In the Body of the Page: <div id="chartdiv" align="left">FusionGadgets</div> <script type="text/javascript"> var myChart = new FusionCharts("../FusionWidgets/Gantt.swf", "iNet_Project", "700", "400", "0", "0"); myChart.setDataURL("projects/gantt3.xml"); myChart.render("chartdiv"); </script> Thanks
  6. FusionCharts (Update Issues)

    Hi, I have checked the path and all is corect and it still comes up with the same problem if I move the FusionCharts.js file into the same directory as the pages. Do you think there might be an issue with the .js file? Stewart
  7. FusionCharts (Update Issues)

    Hello Again, I dont have Firefox installed on my computer, I am currently using Internet Explorer 8. It does throw an error when I bring up the developer tools in IE8 on line 150 which is the following. The error message is "FusionCharts is undefined". var chart_AAFigures = new FusionCharts("../scripts/FusionCharts/Charts/Column3D.swf?ChartNoDataText=Chart Data not provided&PBarLoadingText=Please Wait.The chart is loading...", "AAFigures", "100%", "150", "0", "0","","noScale","EN"); I have double checked the path to the swf files and checked the folder permissions on the folder and all files within the folder, they are currently all set to "Full Control" on the server. Here is the code from the client-side once the page is generated. <!-- START Script Block for Chart AAFigures --> <div id='AAFiguresDiv' > Chart. </div> <script type="text/javascript"> //Instantiate the Chart var chart_AAFigures = new FusionCharts("../scripts/FusionCharts/Charts/Column3D.swf?ChartNoDataText=Chart Data not provided&PBarLoadingText=Please Wait.The chart is loading...", "AAFigures", "100%", "150", "0", "0","","noScale","EN"); //Provide entire XML data using dataXML method chart_AAFigures.setDataXML("<chart caption='Application and Award' subcaption='Figures' xAxisName='Academic Year' yAxisName='Total' debugMode='1' ><set value='644' Label='Awards 0809' /><set value='1749' Label='Applications 0809' /><set value='691' Label='Awards 0708' /><set value='1807' Label='Applications 0708' /></chart>"); // Provide Transparent SWF chart_AAFigures.setTransparent(false); //Finally, render the chart. chart_AAFigures.render("AAFiguresDiv"); </script> <!-- END Script Block for Chart AAFigures --> I have also attempted to move the script files into the same directory as the page and the same thing happens. I tried with Firefox and it does the same thing. Stewart
  8. Hi, I have just downloaded the recent update and have attempted to update one of my pages to make sure everything is working, although the chart doesnt render on the page and only displays "Chart." where the chart is supposed to be. When I "View Source" on the page, all the values and labels are there although no chart. Here is my code: <!--#include file="../scripts/FusionCharts/Class/FusionCharts_Gen.asp"--> <% dim FCAppAwardNumber set FCAppAwardNumber = new FusionCharts call FCAppAwardNumber.setChartType("Column3D") call FCAppAwardNumber.setSize("100%","150") call FCAppAwardNumber.setSWFPath("../scripts/FusionCharts/Charts/") call FCAppAwardNumber.setID("AAFigures") Call FCAppAwardNumber.setChartMessage("ChartNoDataText=Chart Data not provided;PBarLoadingText=Please Wait.The chart is loading...") FCAppAwardNumberParam = "caption=Application and Award;subcaption=Figures;xAxisName=Academic Year;yAxisName=Total;debugMode=1" call FCAppAwardNumber.setChartParams(FCAppAwardNumberParam) call FCAppAwardNumber.addChartData(RS2("Count"), "Label=A 0809", "") call FCAppAwardNumber.addChartData(RS3("Count"), "Label=A 0809", "") call FCAppAwardNumber.addChartData(RS4("Count"), "Label=A 0708", "") call FCAppAwardNumber.addChartData(RS5("Count"), "Label=A 0708", "") %> <html> <head> <SCRIPT LANGUAGE="Javascript" SRC="../scripts/FusionCharts/charts/FusionCharts.js"></SCRIPT> </head> <body> <table><tr><td><% call FCAppAwardNumber.renderChart(false) %> </td></tr></table> </body> </html> The RS3... are all SQL RecordSets, they have not been modifed and were used with the previous charts and are still correctly returning the correct figures. Any help would be greatly appreciated. Stewart