Home > How to make a Flash Line Chart in Rails using Ziya

How to make a Flash Line Chart in Rails using Ziya

February 16th, 2008

Ziya is pretty cool, and the documentation is slowly starting to surface. I was annoyed that I couldn’t find a good example paste of how to make a line chart. Then I watched the screencast. It’s the first example he does, so I’m posting it here so those who can’t watch it can actually find out how to do it.

I’m going to operate on the precondition that you’ve installed Ziya and included it in your controller properly. Do the bar chart example before going any further.

Now, make this function in your controller:


def refresh_chart
  chart = ZIya::Charts::Line.new
  render :text => chart
end


, , , , , , ,

Comments are closed.