[ANN] Ziya plugin - Charting the rails

All,

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 !!

Nice plugin, drop dead ugly logo for your site :slight_smile:

On 12/29/06, De Railed [email protected] wrote:

Best wishes to all for the new year !!


Posted via http://www.ruby-forum.com/.

seth at subimage interactive

http://www.subimage.com
http://sublog.subimage.com

http://dev.subimage.com/projects/substruct

Ha !! Thanks. If you would like to contribute a nice logo we’ll be
happy to oblige…

Take a look at SWF/XML Charts ( maani.us ) 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. :slight_smile:

V/r
Anthony

On 12/30/06, devaulw [email protected] wrote:

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?


Posted via http://www.ruby-forum.com/.


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

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?

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

ZiYa Charting Plugin gets a new home.

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

http://groups.google.com/group/ziya-plugin

Be sure to stop on by and register.