FusionCharts Forum: Routing Error when attempting server side export - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Routing Error when attempting server side export

#1 User is offline   conduit 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 17-May 10

Posted 17 May 2010 - 04:18 PM

I have setup FusionCharts v3 to do server side image and pdf exports (in my dev environment) following the step by step exactly in the README file. Additionally I have RMagic installed, configured and working.



When I right click a chart and choose 'Save as JPG', I get a Routing error as follows:



Routing Error



No route matches "/fusioncharts/fc_exporter/index" with {:method=>:post, :domain=>"l.com", :host=>"demo.l.com", :subdomain=>"demo.l"}



I haven't setup any additional routes within routes.rb but didn't see anywhere in the doc that required this. Am I missing something?



Thanks in advance for your help.
0

Other Replies To This Topic

#2 User is offline   srividya_sharma 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 943
  • Joined: 01-October 07

Posted 18 May 2010 - 04:10 AM

Hi

there is no requirement to configure any routes to use export in RoR.

can you please tell me if you are able to access "/fusioncharts/fc_exporter/index" from your browser?

srividya

regards,
Srividya Sharma
0

Other Replies To This Topic

#3 User is offline   conduit 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 17-May 10

Posted 18 May 2010 - 09:03 AM

Hi,



No unfortunately, I get the same routing error.



Routing Error



No route matches "/fusioncharts/fc_exporter/index" with {:method=>:get, :domain=>"l.com", :host=>"demo.l.com", :subdomain=>"demo.l"}



thanks.
0

Other Replies To This Topic

#4 User is offline   srividya_sharma 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 943
  • Joined: 01-October 07

Posted 18 May 2010 - 09:53 AM

Hi

Did you place fc_exporter_controller.rb in app/controllers/fusioncharts folder?

If you did that, then you should be able to access the index method in the controller.

Srividya

regards,
Srividya Sharma
0

Other Replies To This Topic

#5 User is offline   conduit 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 17-May 10

Posted 18 May 2010 - 10:46 AM

Yeah, it's there. See screen shot:



http://picasaweb.goo...feat=directlink



I have copied all of the files to the locations specified in the README.



And here are the screen shots for /lib and /views:



http://picasaweb.goo...feat=directlink



http://picasaweb.goo...feat=directlink



And below is an example XML of one of my charts:

xml = Builder::XmlMarkup.new

xml.graph(

  :showValues => '0', 

  :decimalPrecision => '0', 

  :formatNumberScale => '0',

  :showhovercap => '1',

  :baseFontSize => '11',

  :canvasBgColor => 'EEEEEE',

  :canvasBorderThickness => '0',

  :canvasBorderColor => 'FFFFFF',

  :canvasBaseDepth => '0',

  :canvasBgDepth => '0',

  :bgColor => 'FFFFFF',

  :divLineColor => 'FFFFFF',

  :divLineThickness => '1',

  :showColumnShadow => '0',  

  :exportEnabled => '1',

  :exportAtClient => '0',

  :exportHandler => 'fusioncharts/fc_exporter/index',  

  :exportFormats =>'JPG|PDF',

  :exporttargetwindow => '_self',

  :exportAction => 'download'

  ) do

  xml.categories do

    @data.first[:data].each { |month| xml.category(:name => month[:month].strftime("%b")) }

  end

  @data.each do |range|

    level = case range[:name]

    when :low; 10

    when :medium; 20

    when :high; 30

    end

    xml.dataset(:seriesname => range[:name].to_s, :color => color_level(level, 30)) do

      range[:data].each { |month| xml.set(:value => month[:count]) }

    end

  end

end      




Let me know if there is any additional information that would be helpful.



thanks.
0

Other Replies To This Topic

#6 User is offline   conduit 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 17-May 10

Posted 18 May 2010 - 02:36 PM

OK, I think I have resolved this by adding some default routes into my routes.rb. Thanks for your help.
0

Other Replies To This Topic

#7 User is offline   Basundhara Ghosal 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2459
  • Joined: 15-September 09

Posted 18 May 2010 - 11:16 PM

Hi,

Thanks for sharing your idea.

Glad that your issue is resolved.

Happy FusionCharting. :P

Regards,

Basundhara Ghosal

Follow us on Twitter :D
0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic