[ANN] Ziya plugin - Charting the rails...

1 view
Skip to first unread message

De Railed

Dec 29, 2006, 7:15:46 PM12/29/06
to rubyonra...@googlegroups.com

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/.

subimage interactive

Dec 29, 2006, 8:05:49 PM12/29/06
to rubyonra...@googlegroups.com
Nice plugin, drop dead ugly logo for your site :)
seth at subimage interactive


Dec 29, 2006, 8:21:42 PM12/29/06
to Ruby on Rails: Talk
Ha !! Thanks. If you would like to contribute a nice logo we'll be
happy to oblige...


Dec 30, 2006, 8:38:57 AM12/30/06
to rubyonra...@googlegroups.com
Make sure this gets listed on the plugins site. If I understand
correctly, this plugin sends down some XML data to the client that gets
rendered in a SWF client. Is that right?

Anthony Eden

Dec 30, 2006, 9:01:38 AM12/30/06
to rubyonra...@googlegroups.com
Take a look at SWF/XML Charts ( http://www.maani.us/xml_charts/ ) to
get more info on how the charts are constructed. The answer is "sort
of": the Flash chart component reads the XML data when it is rendered
on the screen (the URL to the XML appears in the HTML which embeds the
Flash object).

I am glad to see this plugin released as it means there is one less
thing I have to maintain in my code base. :-)


Cell: 808 782-5046
Current Location: Melbourne, FL


Dec 30, 2006, 1:07:00 PM12/30/06
to Ruby on Rails: Talk
Thanks !!

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

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

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
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
colors: 0000bb,00cc00

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.

Thanks for checking us out !!


De Railed

Jan 1, 2007, 11:53:28 PM1/1/07
to rubyonra...@googlegroups.com
ZiYa Charting Plugin gets a new home.

For issues, discussions, news... please tune in here:


Be sure to stop on by and register.

Reply all
Reply to author
0 new messages