workout_calories.each do |w|
workout_calories_array << [w.created_at.to_date,
w.calories_burned]
end
spinclass_calories.each do |sc|
spinclass_calories_array << [sc.created_at.to_date,
sc.calories_burned]
end
So im trying to use a plugin called open flash chart lazy. Its a chart
plugin that renders charts in flash (I think). Heres my controller:
Not answering the question I know, but unless you are really keen on
flash you might to look at the flot javascript library which works
well for me. http://code.google.com/p/flot/
Thanks guys, I fixed it, it was todo with how the plugin installed.
Colin, I dont mind what plugin I use aslong as it works well. Are there
any quick guides or tutorials you could recommend on flot with rails
because I dont mind giving it a go, but I need it working relatively
fast.
The flot website has many examples. There is a Rails plugin,
flotilla, which makes life fairly easy. I don't know whether it is
compatible with Rails 3 if that is an issue for you.
I tried Open Flash Chart (not the lazy version, not sure of the
difference) and thought that the architecture is completely wrong. It
makes the chart in the controller whereas it should of course be in
the view. The controller should just provide the data to be charted
and the view should format it and draw it. That is how it works in
flotilla.
I found flot to be quicker drawing graphs with many points (though
that may not be true on IE as there flot has to use a canvas emulator)
Of course if you are developing a public site you have the major
decision of whether to insist the users have flash enabled or
javascript enabled.