We've just got down with the first implementation of
ZiYa. This rails plugin allows you to display elegant
charts on your webapps, the easy way...
Check out at the details at http://liquidrail.com.
Best wishes to all for the new year !!
--
Posted via http://www.ruby-forum.com/.
I am glad to see this plugin released as it means there is one less
thing I have to maintain in my code base. :-)
V/r
Anthony
--
Cell: 808 782-5046
Current Location: Melbourne, FL
We have tried to list the ZiYa plugin in most sites we knew off. If you
have suggestions
about other sites, we could list on that would be great.
Indeed ZiYa leverages XML/SWF Charts but hides the XML generation part
from the
developer. Within a couple of API calls you should be able to have a
chart rendered in
you web app. For instance in you controller you can do something like
this:
def sales
chart = Ziya::Charts::Bar.new
chart.add(:axis_category_text, %w{ 2002 2003 2004 2005 2006 })
chart.add(:series, "Sales", [ 10, 15, 20, 25, 30 ])
render :text => chart
end
Then in your view code:
<%= gen_chart( "sales_chart",
url_for( :controller => 'my_controller', :action =>
'sales' ),
"#ffffff", 400, 300 ) %>
We've also leveraged YAML and ERB to enable you to style the chart
just like
you would for HTML and stylesheets. The cool thing here ( so we
think... ) is
that you can dynamically style your charts based on some model
state.
For example, if you want a certain aspect of the chart to change
color based
on some threshold, you could override the style sheet with something
like this:
<%=comp :series_color%>
<%if @options[:sales] > 10%>
colors: ff0000,aa0000
<%else%>
colors: 0000bb,00cc00
<%end%>
If this looks less than ideal you can also define a ZiYa helper
function which would render
the code above as such:
<%=comp :series_color%>
<%= custom_colors @options[:sales]%>
There is more info about that in the rdocs.
http://ziya.liquidrail.com/rdoc.
Thanks for checking us out !!
-Fernand
For issues, discussions, news... please tune in here:
http://groups.google.com/group/ziya-plugin
Be sure to stop on by and register.