Created
May 16, 2016 06:55
-
-
Save daipresents/21ab0a8ba3662dacd17edeec840ad9f0 to your computer and use it in GitHub Desktop.
RedmineプラグインでOpen Flash Chart(OFC2)を使うとIO ERROR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def index | |
@graph = open_flash_chart_object(600,300,"/version_burndown/graph_code") | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Open Flash Chart | |
IO ERROR | |
Loading test data | |
Error #2032 | |
This is the URL that I tried to open:/version_burndown/graph_code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
swfobject.embedSWF("/open-flash-chart.swf", "flash_content_DleU0GzY", "800", "450", "9.0.0", "expressInstall.swf",{"data-file":"%2Fversion_burndown%2Fgrapha_code"}); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5) Add the following to the test_it_controller.rb in RAILS_ROOT/app/controllers: | |
class TestItController < ApplicationController | |
def index | |
respond_to do |wants| | |
wants.html { | |
@graph = open_flash_chart_object( 600, 300, url_for( :action => 'index', :format => :json ) ) | |
} | |
wants.json { | |
chart = OpenFlashChart.new( "MY TITLE" ) do |c| | |
c << BarGlass.new( :values => (1..10).sort_by{rand} ) | |
end | |
render :text => chart, :layout => false | |
} | |
end | |
end | |
end | |
6) Add the following to index.html.erb in RAILS_ROOT/app/views/test_it/: | |
<html> | |
<head> | |
<script type="text/javascript" src="/javascripts/swfobject.js"></script> | |
</head> | |
<body> | |
<%= @graph %> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def index | |
@graph = open_flash_chart_object( 800, 450, url_for( :action => 'graph_code', :project_id => @project.id, :version_id => @version.id ) ) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment