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 |
def view @graph = open_flash_chart_object(500,250, '/projects/open_flash_chart/one', true, '/projects/') end def one g = Graph.new g.title("Spoon Sales", '{font-size: 26px;}') g.set_data([0,0,33,16,9,11,30,48,47,49,16,49]) g.set_x_labels(%w(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)) g.set_y_max(60) g.set_y_label_steps(6) render :text => g.render end |
1 |
<%= @graph %>
|
Back to other graph examples