mitch

Members
  • Content count

    7
  • Joined

  • Last visited

Everything posted by mitch

  1. I am attempting to render a chart in a child window, anyone have an idea to try? In the code below, the pie chart renders fine but I can't get the 3D bar to render. This is a variation of the example presented for PHP and Javascript provided on FusionCharts.com function pieChartRender(xml) { var pieObj = new FusionCharts("FusionCharts/Pie3D.swf", "Totals", "600", "400", "false", "true"); pieObj.setDataXML(xml); pieObj.render("pieChart"); setTimeout('process()', 30000); } function updateChart(port) { var title=null; switch (port) { case 0: title = 'ICMP'; break; case 21: title = 'FTP'; break; case 22: title = 'SSH'; break; case 23: title = 'TELNET'; break; case 25: title = 'SMTP'; break; case 53: title = 'DNS'; break; case 67: title = 'DHCP'; break; case 68: title = 'DHCP'; break; case 69: title = 'TFTP'; break; case 80: title = 'HTTP'; break; case 81: title = '8e6 Filter'; break; case 88: title = 'KERB'; break; case 123: title = 'NTP'; break; case 135: title = 'MS EPMAP'; break; case 137: title = 'NBNS'; break; case 138: title = 'NBDS'; break; case 139: title = 'NBSS'; break; case 161: title = 'SNMP'; break; case 389: title = 'LDAP'; break; case 443: title = 'HTTPS'; break; case 445: title = 'MS SMB AD'; break; case 500: title = 'ISAKMP'; break; case 1025: title = 'WINDWS/UNKNOWN'; break; case 1026: title = 'MSDCOM'; break; case 1115: title = 'EXCHANGE'; break;myDiv case 1433: title = 'MSSQL'; break; case 1494: title = 'CITRIX'; break; case 1521: title = 'ORACLE'; break; case 2245: title = 'SVS'; break; case 2483: title = 'ORACLE'; break; case 2598: title = 'CITRIX'; break; case 4096: title = 'AAFES'; break; case 45974: title = 'EPOS'; break; case 10039: title = 'ADS'; break; default: title = port; } var strXML = ""; var i = 0; for( i=0;i strXML += ""; } strXML += ""; mywindow = window.open("http://localhost/yanmadev/barChart.html", "mywindow"); var barChartObj = new FusionCharts("FusionCharts/Column3D.swf", "Talkers", "4000", "600", "0", "1"); var test = mywindow.document.getElementById("barChart3D"); alert(test); barChartObj.setDataXML(strXML); barChartObj.render("barChart3D"); }
  2. render chart in child window

    Gentleman: I have resolved most of my problems with jQuery and am now in the process of learning YUI to see how that works. Great product! Just took advantage of your 15% discount and bought a developers license.
  3. render chart in child window

    Update gentleman! I changed my code in the javascript to the url of the server. My original code was using http://localhost. when a client browser sees this, it assumes it's a cross domain attemtp to query the pc and blocks it, hence the pop ups work. However I ned to work on a few things.... 1. How to load the pop up window in advance so the element exists to render the bar chart from the pie chart. 2. dynamically sizing the chart so not all charts are huge 3. While the app works well in Opera and Firefox, MS IE7 won't load at all and errors out on the xmlHttp.open method. I will work on these three myself and contact you if I need help. Thanks for your support.
  4. render chart in child window

    Gentleman interesting twist. (btw, I have attached a zip file). The following js code works locally, that is if I use the browser on the same machine as apache. The only way it works is with the alert in the fist few lines of the updateChart function. However, if I try from a remote machine on Opera I get security errors regarding Javascript that say "attempting to read protected variable. function updateChart(port) { detailsPop = window.open("http://localhost/yanmadev/barChart.html", "Details", "scrollbars=1", "width=1000, height = 600"); newElement = detailsPop.document.createElement("div"); newElement.setAttribute("id", "barChart3D"); alert(newElement.getAttribute("id") + "rendered"); detailsPop.document.body.appendChild(newElement); var title=null; switch (port) { case 0: title = 'ICMP'; break; case 21: title = 'FTP'; break; case 22: title = 'SSH'; break; case 23: title = 'TELNET'; break; case 25: title = 'SMTP'; break; case 53: title = 'DNS'; break; case 67: title = 'DHCP'; break; case 68: title = 'DHCP'; break; case 69: title = 'TFTP'; break; case 80: title = 'HTTP'; break; case 81: title = '8e6 Filter'; break; case 88: title = 'KERB'; break; case 123: title = 'NTP'; break; case 135: title = 'MS EPMAP'; break; case 137: title = 'NBNS'; break; case 138: title = 'NBDS'; break; case 139: title = 'NBSS'; break; case 161: title = 'SNMP'; break; case 389: title = 'LDAP'; break; case 443: title = 'HTTPS'; break; case 445: title = 'MS SMB AD'; break; case 500: title = 'ISAKMP'; break; case 1025: title = 'WINDWS/UNKNOWN'; break; case 1026: title = 'MSDCOM'; break; case 1115: title = 'EXCHANGE'; break;myDiv case 1433: title = 'MSSQL'; break; case 1494: title = 'CITRIX'; break; case 1521: title = 'ORACLE'; break; case 2245: title = 'SVS'; break; case 2483: title = 'ORACLE'; break; case 2598: title = 'CITRIX'; break; case 4096: title = 'AAFES'; break; case 45974: title = 'EPOS'; break; case 10039: title = 'ADS'; break; default: title = port; } var strXML = "<chart caption='" + title + "' xAxisName='Kilobytes' xAxisName='Hosts' labelDisplay='ROTATE'slantLabels='1' chartLeftMargin='100' showValues='0'>"; var i = 0; var counter = data[port].length; if(counter > 30) { counter = 30; } for( i=0;i<counter; i++) { strXML += "<set label='" + data[port][i][0] + "'value='" + data[port][i][1] + "' />"; } strXML += "<styles>"; strXML += "<definition>"; strXML += "<style name='chartFont' type='font' size='12' face='Verdana' bold='1'/>"; strXML += "</definition>"; strXML += "<application>"; strXML += "<apply toObject='DATALABELS' styles='chartFont'/>"; strXML += "</application>"; strXML += "</styles>"; strXML += "</chart>"; var barChartObj = new FusionCharts("FusionCharts/Column3D.swf", "Talkers", "1500", "600", "0", "1"); var div = detailsPop.document.getElementById("barChart3D"); barChartObj.setDataXML(strXML); barChartObj.render(div); } mitchfiles.zip
  5. render chart in child window

    Not much luck. I already have a link in my pie slices (javascript:updateChart(port) ) to the function updateChart, which then takes the data in my jsVarString and generates the detailed data for a Column3D graph. Am I missing something else? if($percent > 0 ) { $jsVarString.= "<set label='" . $label . "'value='" . $percent . "'link='javascript:updateChart(". $key . ")'/>"; } } $jsVarString.= "<styles>"; $jsVarString.= "<definition>"; $jsVarString.= "<style name='chartFont' type='font' size='12' face='Verdana' bold='1'/>"; $jsVarString.= "</definition>"; $jsVarString.= "<application>"; $jsVarString.= "<apply toObject='DATALABELS' styles='chartFont'/>"; $jsVarString.= "</application>"; $jsVarString.= "</styles>"; $jsVarString.= "</chart>";
  6. render chart in child window

    I'll give it a shot today and let you know. (Can't believe I overlooked this in the on-line docs.)
  7. Is it possible to create a FusionChart that wraps data? In other words. suppose I have a chart that updates every minute but holds no more than say 5 minutes total. The X-axis might have labels like minute 1, minute 2, minute 3, minute 4, minute 5. At minute 1 only one minutes worth of values are plotted and the area of the canvas along minutes 2, 3, 4, and 5 displays just the background color. At minute two, without redrawing the entire chart, values are now plotted along minute 1, and 2, while the data for minutes 3, 4, and 5 is still blank. This should continue until all 5 minutes along the X axis have been plotted and finally the chart rebuilds anew and the whole process starts over. Can this be done in Fusion Charts?