Bliksem

Members
  • Content count

    19
  • Joined

  • Last visited

Everything posted by Bliksem

  1. Ie8 Win Xp Javascript Error

    Oh, just to be thorough, we have purchased two licenses of FusionCharts XT (@version fusioncharts/3.2.2-release.3880) at the moment. I can provide my license codes in the event that they will be needed to upgrade or resolve the issues. Thanks!
  2. Ie8 Win Xp Javascript Error

    I am having the same problem on Windows XP and IE8. Some other post indicates we must put compatibility mode on, but if we do, our system, which requires IE8, registers as IE7, and the entire system does not work. I also found elsewhere in this forum posting (http://forum.fusionc...__fromsearch__1) that the latest version solves that problem, but if you do that, the graphs don't export properly, which brings me to the other unsolved problem I have, which I reported here: http://forum.fusionc...__fromsearch__1, which is still not solved :-( So, in short, based on the posts mentioned above, if I DO NOT upgrade, graphs do not show on IE8. If I DO upgrade, the export does not work. Anyone has an idea how to overcome BOTH problems? I can not choose which one I want to solve, as both export and display is needed - our system can not work without both showing and exporting the graphs. Thanks in advance, Kobus
  3. Hi all, I hope you can help me with a solution to this problem I am having. I have adapted the FusionCharts JavaScript code to export graphs to images, but I get a very strange error, which I am absolutely unable to trace. missing } after property list Notice: Uninitialized string offset: 0 in /srv/.../FusionChartsExportHandlers/FCExporter.php on line 419 Now... Line 419 in that file looks like this: $arrStatus [] = "DOMId=" . @$meta["DOMId"]; It is about the 4th line of code (excluding comments) in the function parseExportedStatus. As my graphs are rendering fine, and the error did not occur before I attempted to export the graphs to JPG, I assume that my data structure for the graphs are fine, but I did take the generated JS source for the graphs, and evaluated it for missing quotes, and brackets, and general syntax errors, which are none. Hence I am not going to paste my chart code here - I am sure that works. So the only thing remaining is the JavaScript I have added to export the graph. This looks as follows <script type="text/javascript"> function FC_Rendered (domID) { if (domID == "<?php echo $chartID1; ?>") { if (FusionCharts('<?php echo $chartID1; ?>').exportChart) { FusionCharts('<?php echo $chartID1; ?>').exportChart( { "exportFormat" : '<?php echo $exportFormat; ?>' } ); } } else if (domID == "<?php echo $chartID2; ?>") { if (FusionCharts('<?php echo $chartID2; ?>').exportChart) { FusionCharts('<?php echo $chartID2; ?>').exportChart( { "exportFormat" : '<?php echo $exportFormat; ?>' } ); } } } function FC_Exported (statusObj) { if (typeof count_rendered == 'undefined') { count_rendered = 0; } if (statusObj.DOMId == "<?php echo $chartID1; ?>") { $('#filename1').text(statusObj.fileName); count_rendered += 1; } else if (statusObj.DOMId == "<?php echo $chartID2; ?>") { $('#filename2').text(statusObj.fileName); count_rendered += 1; } if (count_rendered == 2) { $('#print-icon-action').show(); $('#print-icon-message').hide(); } } </script> <div id="filename1" style="display: none;"></div> <div id="filename2" style="display: none;"></div> (The filename divs is just so that I can reference the filename of the image that was exported). Can anybody see anything wrong with this code? Why would I get this error?
  4. Missing } After Property List

    Hi, I tried the attached code and swf and exporters. Now my graphs show "FusionCharts Trial", so I have to replace them back - I am using a licensed copy. But even with the replacement files (except for FusionCharts.php - I have not implemented that, as it says "Class not found fusioncharts.php"). There is a FusionCharts_Gen.php or something file in my licensed copy, which got renamed to FusionCharts.php (not sure where exactly I read to do that - but it is somewhere on your site). I use a PHP function to draw my charts. Herewith the code for that: function BuildChart($chartdata, $chartsettings, $chartbase) { $FC = new FusionCharts($chartbase['type'], $chartbase['width'], $chartbase['height']); $FC->chartID = $chartsettings['chartID']; $FC->setSWFPath(base_url(). "application/libraries/fusioncharts/"); $FC->setChartParams(ChartSettings($chartsettings)); foreach ($chartdata as $key => $value) { $FC->addChartData($value, "Label=" . $key); } return $FC->renderChart(false, false); } function BuildChart_MS($chartdata, $category, $chartsettings, $chartbase) { $FC = new FusionCharts($chartbase['type'], $chartbase['width'], $chartbase['height']); $FC->chartID = $chartsettings['chartID']; $FC->setSWFPath(base_url(). "application/libraries/fusioncharts/"); $FC->setChartParams(ChartSettings($chartsettings)); foreach ($category as $key => $value) { $FC->addCategory($value); } foreach ($chartdata as $key => $value) { $FC->addDataset($key); foreach($value as $item) { $FC->addChartData($item); } } return $FC->renderChart(false, false); } The Linux version/distro as shown by phpinfo() only returns "Linux/SUSE", so not sure which version. Apache 2.2.10, PHP 5.2.6. That is all that I can see that is significant in there. The system is built on CodeIgniter 2.1.0. Kind regards and thanks! Kobus
  5. Missing } After Property List

    Hi Sudpito, Here are the details for my charts (also see how the graphs are rendered on screen - the errors occur only during exporting): 1. All charts have dimensions 600 x 300 2. There are 7 charts on the page (but even with 1 chart, it causes the error). 2 charts are normal line or bar (single series) charts, and 5 charts are MSLine (multi-series line) charts. 3. The data for the seven charts is below (and also attached as text file for easier reference): First chart: Solvency / Liquidity / Current Ratio (Multi-series - 3 categories) Category Array ( [0] => 2006 [1] => 2007 [2] => 2008 [3] => 2009 [4] => 2010 ) Data Array ( [solvency] => Array ( [2006] => 0.61 [2007] => 0.59 [2008] => 0.62 [2009] => 0.7 [2010] => 0.71 ) [Liquidity] => Array ( [2006] => 1.24 [2007] => 1.36 [2008] => 1.38 [2009] => 0.81 [2010] => 0.82 ) [Current ratio] => Array ( [2006] => 1.37 [2007] => 1.52 [2008] => 1.5 [2009] => 0.97 [2010] => 0.99 ) ) Second chart: Profitability (Multi-series - 5 categories) Category Array ( [0] => 2006 [1] => 2007 [2] => 2008 [3] => 2009 [4] => 2010 ) Data Array ( [Return on Assets] => Array ( [2006] => 0.03 [2007] => 0.05 [2008] => -0 [2009] => -0.05 [2010] => 0.01 ) [Return on Equity] => Array ( [2006] => 0.09 [2007] => 0.12 [2008] => -0 [2009] => -0.16 [2010] => 0.05 ) [Consultant Spend over Revenue] => Array ( [2006] => 0.01 [2007] => 0.02 [2008] => 0.03 [2009] => 0.04 [2010] => 0.03 ) [Operating Margin] => Array ( [2006] => 0.32 [2007] => 0.27 [2008] => 0.07 [2009] => -0.21 [2010] => 0.1 ) [Net Profit Margin] => Array ( [2006] => 0.12 [2007] => 0.18 [2008] => -0 [2009] => -0.18 [2010] => 0.05 ) ) Third chart: Revenue vs. Employees (Multi-series - 2 categories) Category Array ( [0] => 2006 [1] => 2007 [2] => 2008 [3] => 2009 [4] => 2010 ) Data Array ( [Revenue per Employee] => Array ( [2006] => 1142766.58 [2007] => 1226296.14 [2008] => 1255451.36 [2009] => 1431095.97 [2010] => 1815537.2 ) ) Fourth chart: Revenues (Single series) Data Array ( [2006] => 36052000000 [2007] => 40068000000 [2008] => 44448000000 [2009] => 54177000000 [2010] => 71209000000 ) Fifth chart: Employees (Single series) Data Array ( [2006] => 31548 [2007] => 32674 [2008] => 35404 [2009] => 37857 [2010] => 39222 ) Sixth chart: Government Relationships (Multi-series - 3 categories) Category Array ( [0] => 2006 [1] => 2007 [2] => 2008 [3] => 2009 [4] => 2010 ) Data Array ( [subsidy] => Array ( [2006] => 0 [2007] => 0 [2008] => 0 [2009] => 149000000 [2010] => 0 ) [Guarantee] => Array ( [2006] => 0 [2007] => 5000000 [2008] => 5000000 [2009] => 175980000000 [2010] => 175980000000 ) [Dividends] => Array ( [2006] => 0 [2007] => 0 [2008] => 0 [2009] => 0 [2010] => 0 ) ) Seventh chart: Liquidity / Debt Cover / Interest Cover (Multi-series - 2 categories) Category Array ( [0] => 2006 [1] => 2007 [2] => 2008 [3] => 2009 [4] => 2010 ) Data Array ( [Debt Cover] => Array ( [2006] => 1.24 [2007] => 1.7 [2008] => 0.66 [2009] => 0.65 [2010] => 0.97 ) [interest Coverage] => Array ( [2006] => 2.53 [2007] => 2.54 [2008] => 0.65 [2009] => -2.69 [2010] => 2.49 ) ) Thanks in advance, Kobus data.txt
  6. Missing } After Property List

    I have also set the memory limit to 256M, doesn't solve it either. Kobus
  7. Missing } After Property List

    I changed the post_max_size to 256M and errors still there when using graphs with dimensions 600 x 300. Using 300 x 150 sized graphs using 8M worked fine. I have now drawn only one graph (multi-series) with 300 x 300 pixels, with the 256M post limit, and the error is still there. Making that single graph a 300 x 200 works without an error, but now the chart is meaningless - it is all garbled up (because it is too small). Sorry for bugging again, but it is still not fixed. I responded too fast before, with the simple test of only making the graphs smaller. Kobus
  8. Missing } After Property List

    Hmmm... With smaller graphs it works... But with big graphs not. I changed the max_post_size from 8MB to 64MB with big graphs and the errors are still there. Should I make it even bigger? Kobus
  9. Missing } After Property List

    Sudipto, Thank you so much. If I make smaller graphs, then I do not get the errors anymore. I will now get my post size increased. Have a great day! Kobus
  10. Missing } After Property List

    Hi, Thanks again for your reply. I have attached herewith the Firebug data screens similar to yours. I have 7 graphs on one page. 6 of them are failing, 1 is exporting fine. This, in my opinion, eliminates anything related to server path, or a setting in FCExporter, or, even a bug in the exporter. The fact that the graphs are rendered correctly (all 7 of them) makes me think there is no error in my implementation (but I may be wrong). I have thus attached a Firebug screenshot for the one graph that works (gets exported) and one screenshot for one of the other 6 that does not get exported. I see no significant differences between them, unless I miss something? EDIT: I have also attached a screenshot of how the graphs are rendered. This shows that there is no errors in my graph settings, otherwise the graphs would not have rendered? Will it help if I attach the code here or not? Thanks for your effort, Rishi, I appreciate it - I am really stumped here, and the project must launch on Friday. :-( Regards, Kobus
  11. Missing } After Property List

    It appears as if different types of graphs are causing the problems. When I use single series charts, they work when using a 2D variant, and when using a 3D variant, or a multi-series chart, I get these errors. Any advice would be greatly appreciated. I am getting seriously desperate. Regards, Kobus
  12. Missing } After Property List

    Hi, Any feedback on this issue? I am still unable to resolve it :-( Thanks Kobus
  13. Missing } After Property List

    Hi, statusCode is 0, as per the screenshot above. Thanks! Kobus
  14. Missing } After Property List

    Hi Rishi, Thanks for your comment. I have initialized the array as suggested, but the problem still persists. I have taken line 419 as described above, $arrStatus [] = "DOMId=" . @$meta["DOMId"]; and broke it up as follows: $arrStatus [] = "DOMId=" . @$meta["DOMId"]; Now the error is on line 423, not 419 anymore (due to array declaration of $arrStatus, and also the line breaks), hence the problem is with the @$meta["DOMid"] line. My DOMids are created correctly, as shown in my code samples above, so I did some further attempt at debugging, and managed to find quite by chance (as logging $meta to console.log didn't work as I thought it would) that DOMid is not set, width is 0 and height is 0, which are all not correct, as the charts are rendering perfectly. See attached screenshot. I also tested by trying to log the individual array elements of $meta to see if that gives me a clearer indication, but it doesn't. If I try to do console.log on $meta['DOMid'], I now get the same error, on the console.log line: echo ' <script type="text/javascript"> console.log("' . $meta['DOMid'] . '"); </script> '; It is thus seeming like the meta data is not passed to the FCExporter for some reason. Thanks, Kobus
  15. Missing } After Property List

    Here is my rendered JS code: function FC_Rendered (domID) { //FusionCharts.debugMode.enabled(true); //FusionCharts.debugMode.outputTo( function() { console.log(arguments); } ); //FusionCharts.debugMode.outputFormat('verbose'); if (domID == "SolvLiqCur") { if (FusionCharts('SolvLiqCur').exportChart) { FusionCharts('SolvLiqCur').exportChart( { "exportFormat" : 'JPG' } ); } } else if (domID == "Profitability") { if (FusionCharts('Profitability').exportChart) { FusionCharts('Profitability').exportChart( { "exportFormat" : 'JPG' } ); } } else if (domID == "RevenueEmpl") { if (FusionCharts('RevenueEmpl').exportChart) { FusionCharts('RevenueEmpl').exportChart( { "exportFormat" : 'JPG' } ); } } else if (domID == "GovRels") { if (FusionCharts('GovRels').exportChart) { FusionCharts('GovRels').exportChart( { "exportFormat" : 'JPG' } ); } } else if (domID == "LiqDebtInterest") { if (FusionCharts('LiqDebtInterest').exportChart) { FusionCharts('LiqDebtInterest').exportChart( { "exportFormat" : 'JPG' } ); } } } function FC_Exported (statusObj) { if (typeof count_rendered == 'undefined') { count_rendered = 0; } if (statusObj.DOMId == "SolvLiqCur") { $('#filename1').text(statusObj.fileName); count_rendered += 1; } else if (statusObj.DOMId == "Profitability") { $('#filename2').text(statusObj.fileName); count_rendered += 1; } else if (statusObj.DOMId == "RevenueEmpl") { $('#filename3').text(statusObj.fileName); count_rendered += 1; } else if (statusObj.DOMId == "GovRels") { $('#filename4').text(statusObj.fileName); count_rendered += 1; } else if (statusObj.DOMId == "LiqDebtInterest") { $('#filename5').text(statusObj.fileName); count_rendered += 1; } if (count_rendered == 5) { $('#print-icon-action').show(); $('#print-icon-message').hide(); } }</script> From this I see the export format is correct as planned, and all the IDs are fine as expected, so I am officially stumped :-( Kobus
  16. Missing } After Property List

    I have switched the debugger on now, and found that all five my charts have rendered. Some of them are missing the "dataloaded" event though [ss_error]. But the graphs all render perfectly as intended, as shown in [ss_rendered] screenshot. Any hints would be greatly appreciated. This thing has had me running around like a headless chicken for several hours now... :-(
  17. Missing } After Property List

    Hi again, I have alerted out the following alert(FusionCharts('<?php echo $chartID2; ?>').exportChart); , and got the a strange error that appears to state that my chart may not have completed rendering... function () { if (this.ref === void 0 || this.ref === null || typeof this.ref[b] !== "function") { a.raiseError(this, "25081617", "run", "~" + b + "()", "ExternalInterface call failed. Check whether chart has been rendered."); } else { return this.ref[b].apply(this.ref, arguments); } } Now this is strange, because I am calling the export function in the FC_Rendered() function, which is the function called after the chart was generated. Not true? Kobus PS: EDIT: I have now delayed the call for rendering for 15 seconds, and the error still occurs. Not sure what to do next.
  18. Missing } After Property List

    Here is the exporting method I am using: http://docs.fusioncharts.com/charts/contents/exporting-image/server-side/ECServerSave.html Thanks again! Kobus
  19. Missing } After Property List

    Hi Sumedh, No, I have not included the js file you mentioned. I have done this before in another project that works without including this component as well. Since I do not use this JS file, I can not switch the debug mode on.. Maybe I should explain how I implemented fusioncharts? 1. I use the PHP version for most functionality 2. I include fusioncharts.js in my <head> tag 3. I use a function to build my chart, as shown below: function BuildChart($chartdata, $chartsettings, $chartbase) { $FC = new FusionCharts($chartbase['type'], $chartbase['width'], $chartbase['height']); $FC->chartID = $chartsettings['chartID']; $FC->setSWFPath(base_url(). "application/libraries/fusioncharts/"); $FC->setChartParams(ChartSettings($chartsettings)); foreach ($chartdata as $key => $value) { $FC->addChartData($value, "Label=" . $key); } return $FC->renderChart(false, false); } 4. I did not have to include any additional code to export the charts in the previous project that it did work in. 5. I compared the code of these projects, and I **think** I have replicated it correctly, but the code is obviously not exactly the same as it is totally different projects. 6. Using Code Igniter 2.x and MySQL 5.2.x database, and XAMPP as development stack locally, and a flavor of Debian Linux on deployment server. I do not know what else to tell you. I hope this helps in tracking the problem further. Thank you for your response! Kobus