ZiYa Plugin - Charting the rails...
Delynn and I have been hard at work and are pleased to announce the ZiYa Plugin.
ZiYa is based on the most excellent XML/Swf charts charting tool. It allows you to render charts in your web app by leveraging Flash rendering. No worries mate, you won't need to learn Flash to use this plugin. Sure there are many tools out there you can use to generate charts for your rails app but none are easier to setup and maintain than ZiYa.
ZiYa offers the following advantages:
- Offload the chart rendering activity to the client side. No need to install Rmagick and the likes on your server.
- Style your charts using the Ziya YAML style-sheets.
ZiYa leverages YAML and ERB for styling which allows you to perform dynamic styling based on certain model states. - Uses themes to provide consistent charts look and feel.
- Embed links within your charts and use them for navigation and drill-down activities.
- Provides dramatic chart transition.
- Embed ajax periodical refresh by calling back to your controller.
Getting Started...
- Download the plugin:
ruby script/plugin install svn://rubyforge.org/var/svn/liquidrail/plugins/ziya/trunk
- Setup ZiYa for your controller:
class BleeController < ApplicationController
include Ziya - Define an action to setup a bar chart:
def fred
chart = Ziya::Charts::Bar.new
render :text => chart
end - In the associated view use the ZiYa helper
<%=gen_chart( "blee", url_for( :controller => 'blee', :action => 'fred' ), '#ffffff', 400, 300 )%>
You can find out more about Ziya by reading the documentation here or view the samples apps to get some idea on the possibilities.
Let us know what you think...Comments
-
Hells yeah. This is excellent; I can't wait to try it out. Thanks for all the hard work on this.
-
Hi, this plugin is really cool. I've tried it for a couple of hours now, and getting to know the XML/SWF lib also. After some initial trouble with getting it to work, I had to run edge-rails and to define class Ziya::Charts::Base def size 0 end end to make if continue without errors (hope this helps some). Finally, i suggest you replace your gen_chart helper with a w3c compliant version: Look here: http://alistapart.com/articles/flashsatay using <embed> is not even deprecated, it's no-standard-ol-ns-stuff ;-) Fantastic work guys, this is definitely my preferred graph tool for rails now.
