• Content count

  • Joined

  • Last visited

About laurent25

  • Rank
    Junior Member
  1. Problem With Multiple Export Server Side

    Well never mind that issue only occurs on my local machine, work like a charm on the server.
  2. Problem With Multiple Export Server Side

    I have fixed my second issue quite simply. And i have tested a bit further my first issue. If I ask to export 3 charts at a time it work great and it's fast (Files are created almost immediatly after the flash export progression hit 100%) But as soon as I try to export more than 3 at a time, it take several minutes to get the file. Any ideas?
  3. Hello, I'm trying to setup a multiple charts export server side. Here is what I want to do, export the 5 charts that are on my page by saving each one individually as an JPEG image on my server. Once it's done call a JS function that will create a pdf with those images. I have additional data to put in the pdf beside the chart that why i'm not exporting directly in pdf. Now when I try to export 1 chart it work nicely, the image is saved and the exportCallback is made. My problem come when i try to export them all, I'm using a JS function that i found in the SampleAppRails3 function exportCharts(exportFormat) { initiateExport = true; for ( var chartRef in FusionCharts.items ) { //alert(chartRef); if ( FusionCharts.items[chartRef].exportChart ) { FusionCharts.items[chartRef].exportChart( { "exportFormat" : exportFormat } ); } else { console.log('charts not finished loading'); } } } Two big issues, first for some unknown reason it take several minutes before my first image appear on the server, usualy the others one come soon after. Althought i see all the export being done immedialty on the server, then nothing in the log. Tried with firefox 3.6 and last version of chrome. Second the exportCallback is made after each one, not just once at the end.
  4. Problem With Server-Side Export

    Well by making a Sample of my app I found the issue. By default in a RoR app there are those two lines in the application.rb config.autoload_paths += %W(#{config.root}/lib) config.autoload_paths += Dir["#{config.root}/lib/**/"] For some reason there were missing from mine. Thanks for the help you have provided for the noob that i am
  5. Problem With Server-Side Export

    Yeah I could try to do a sample of my app this afternoon. Meanwhile i tried to do a simple case test with the render_chart helper. My app is in EXT JS so i don't use them. I did the same thing as the sample, I put the helpers in the libs folder and included FusionChartsHelper in application_helper.rb But of course me i get an error: ActionController::RoutingError (uninitialized constant ApplicationHelper::FusionChartsHelper) I have a very simple action : def test #Number of terminals by month data = [{:label => 'Dec', :value => 11589},{:label => 'Jan', :value => 12222},{:label => 'Feb', :value => 10000},{:label => 'Mar', :value => 8658},{:label => 'Apr', :value => 10500},{:label => 'May', :value => 11112}] @nbr_terminals = {"chart"=>{:exportEnabled=>1,:exportAtClient => 0,:exportHandler=>'/fusioncharts/fc_exporter/index',:exportFormats=>"JPG",:exportAction=>"save", "caption"=>"Number of terminals per month","setAdaptiveYMin"=>1,"showValues"=>0,"xaxisname"=>"Month","yaxisname"=>"Terminals","thousandSeparator"=>" ","formatNumberScale"=>0},:data => data} end and a basic view : <% #Create the chart - Column 3D Chart with data from /Data/SaveData.xml render_chart "/FusionCharts/Line2D.swf", "", @nbr_terminals, "myFirstExport", 600, 300, false, true, {:data_format=>"json"} %>
  6. Problem With Server-Side Export

    I have tried with files from the FusionCharts_Evaluation (My compagny have licences but all they gave me was the fusioncharts JS and the swf files since they are working in PhP) And I have tried with the files from the sample.
  7. Problem With Server-Side Export

    I have tried with this route: match 'exportHandler' => "fusioncharts/fc_exporter/index" RoR didn't like match :exportHandler=>"/fusioncharts/fc_exporter/index" But i got the same thing ActionController::RoutingError (uninitialized constant Fusioncharts::Exporter): lib/fusioncharts/exporter/error_handler.rb:8:in `<top (required)>' app/controllers/fusioncharts/fc_exporter_controller.rb:45:in `<class:FcExporterController>' app/controllers/fusioncharts/fc_exporter_controller.rb:44:in `<top (required)>' This is driving me crazy
  8. Problem With Server-Side Export

    Yes the sample worked nicely except the multi export one but that for later As for my application I'm keep getting ActionController::RoutingError (uninitialized constant xxxxxxxxxxx)
  9. Problem With Server-Side Export

    I still can't make it works The route I had setup was wrong, missed the folder fusioncharts I got this now: match 'fusioncharts/fc_exporter/index' => 'fusioncharts/fc_exporter#index' But i got a new error ActionController::RoutingError (uninitialized constant Fusioncharts::Exporter): lib/fusioncharts/exporter/error_handler.rb:8:in `<top (required)>' app/controllers/fusioncharts/fc_exporter_controller.rb:45:in `<class:FcExporterController>' app/controllers/fusioncharts/fc_exporter_controller.rb:44:in `<top (required)>' I feel like i miss another route. Any doc anywhere that explain which route I have to setup in RoR to make this works?
  10. Problem With Server-Side Export

    Thanks for the link, I tried the sample and it works. Hopefully I will find what wrong in my application thank to that..
  11. Problem With Server-Side Export

    I'm using Rails 3.0.3
  12. Problem With Server-Side Export

    Hello, I'm using RoR so I have posted my issue in the RoR forum but since i got no answers the last couple of days I'm trying my luck here. Here is my original post:
  13. Hello, I'm trying to put in place a server-side export my charts. Here is what I did so far: - Copied fc_exporter_controller.rb, fc_exporter_img_controller.rb , fc_exporter_pdf_controller.rb controllers in Controllers/Fusioncharts/ - Copied error_handler.rb , error_messages.rb , generator.rb , properties.rb , save_helper.rb in Lib/fusioncharts/exporter/ - Copied error.html.erb into the Views folder I have set the following tag on my chart: :exportEnabled=>1, :exportAtClient => 0, :exportHandler=>"Fusioncharts/fc_exporter/index", :exportFormats=>"JPG", :exportaction=>"save" I have modified the @@SAVEPATH to "./public/export/" in the properties.rb file I have installed the gem rmagick Now when I try to export my chart, i got a "RoutingError (No route matches "/Fusioncharts/fc_exporter/index")" which seems there is no route for that action (By the way there is no mention of that in the Readme.txt) So I added a route => match 'Fusioncharts/fc_exporter/index' => 'fc_exporter#index' And then i got this error: "RoutingError (uninitialized constant FcExporterController)" Any clue on what I'm doing wrong?
  14. Problem With Json Data

    I'm not using any method to pass my JSON atm. I use ETX JS so I have a compoment like this: { xtype: 'fusionpanel', fusionCfg: { swfUrl: 'images/charts/Line.swf', width: "600", height: "300", registerWithJS: true, }, data: @customers_data } Where @customers_data is my var where my json is stored. Those methods you mentioned, are there JS function from FusionCharts JS? Should I have something like data: setJSONUrl(my_url) ?
  15. Problem With Json Data

    Hello, I'm using RoR and when i try to pass data to my chart using a url i got this error: INFO: XML Data provided using dataXML method. ERROR: Invalid XML encountered. A start-tag is not matched with an end-tag. Click the above "dataURL Invoked" link to see the XML in browser Or check the XML data provided. But if I open the url in my browser, copy past its content to a var in my action then pass it as data to my chart it works... Any idea why? data.txt