Note: Version 2 of Open Flash Chart is available. Examples for version 2 are here.
Back to other graph examples
The Graph:
The Code:
This code in the controller:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
def view @graph = open_flash_chart_object(500,250, '/projects/open_flash_chart/pie_links', true, '/projects/') end def pie_links data = [] links = [] 5.times do |t| temp = rand(10) + 5 data << temp links << "javascript:alert('temp')" end g = Graph.new g.pie(60, '#505050', '{font-size: 12px; color: #404040;}') g.pie_values(data, %w(IE FireFox Opera Wii Other), links) g.pie_slice_colors(%w(#d01fc3 #356aa0 #c79810)) g.set_tool_tip("#val#%") g.title("Pie Chart with links", '{font-size:18px; color: #d01f3c}' ) render :text => g.render end |
1 |
<%= @graph %>
|
Back to other graph examples