trouble creating first ziya-chart...please help

0 views
Skip to first unread message

Ralph

unread,
Jun 26, 2008, 9:02:04 PM6/26/08
to ZiYa Plugin
The download instruction (ruby script/plugin install
svn://rubyforge.org/var/svn/liquidrail/plugins/ziya/trunk ) didnt work
for me.
I even tried the subversion style: svn co....still didnt work.
Anyway, i went to the rubyforge's liquidrail project (http://
rubyforge.org/projects/liquidrail/) and downloaded ziya v 0.008.
i saved the trunk dir in vendor/plugin dir and renamed it ziya.
If this is not the latest, do you mind emailing me a compressed ziya
plugin.

Here is a simple project i tried following you tube and google group
discussion tutorials:

My controller is "firstchart" and has the following contents:

require 'ziya'
class FirstchartController < ApplicationController
include Ziya
def index
end

def refresh_chart
chart = Ziya::Charts::Line.new

chart.add(:axis_category_text, %w{2006 2007 2008})
chart.add(:series, "Dogs", [10,20,30])
chart.add(:series, "Cats", [5,10,15])
render :xml => chart.to_xml
end
end

My view "index.html" and has the following contents:

<%= gen_chart("firstchart", url_for(:controller =>
"firstchart", :action => "refresh_chart"), "#ffffff", 400, 300) %>

Call on url: http://localhost:3000/index

I have gone through all the discussions in google group and tried
several modifications of my code, but no success yet.

Please, help me settle this issue. I am evaluating a bunch of chart
plugins for my company and ziya plugin may deliver what i really want
if it works. Thanks.

Ziya fan, Ralph.

Ralph

unread,
Jun 26, 2008, 9:07:07 PM6/26/08
to ZiYa Plugin
More info for the posted problem: trouble creating first ziya chart

I also called url: http://localhost:3000/firstprog
i also tried: http://localhost:3000/firstprog/index

No success. help.

Ralph

unread,
Jun 26, 2008, 11:19:34 PM6/26/08
to ZiYa Plugin
Thank you all in advance.

I tried the same application from home and it is now working.
Reason: My company's network security system was blocking full
download of the plugin.
At home i just repeated: ruby script/plugin install
svn://rubyforge.org/var/svn/liquidrail/plugins/ziya/trunk
and then started my server. Ziya worked the magic and i am so
happy....
Long live ziya...

For my fellow beginners:

step by step on ruby on rails, windows environment (instant rails
package):

- rails Charts
- cd Charts
- ruby script/plugin install svn://rubyforge.org/var/svn/liquidrail/plugins/ziya/trunk
- rake db:create
- ruby script/generate migration Firstchart
- rake db:migrate
- ruby script/generate controller Firstchart

# Now lets modify the necessary files

# Navigate to app/controllers directory

# Edit firstchart_controller to match the following:

require 'ziya'
class FirstchartController < ApplicationController
include Ziya

def index
end

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.to_xml
end
end

# Navigate to app/views/firstchart directory

# create index.html file and make sure it is an ERB File

# Edit it to match the following:

<%= gen_chart( "sales_chart", url_for( :controller =>
'firstchart',:action =>'sales' ), "#ffffff", 400, 300 ) %>

# run your server

- ruby script/server

# Navigate your browser to the following url:

http://localhost:3000/firstchart


THANK YOU ALL ONCE AGAIN..........@Ralph
> > Ziya fan, Ralph.- Hide quoted text -
>
> - Show quoted text -

Fernand Galiana

unread,
Jun 27, 2008, 11:13:26 AM6/27/08
to ziya-...@googlegroups.com
Hi Ralph,

   Thanks you for posting this information. Glad to hear you go it working for you !

-Fernand
Reply all
Reply to author
Forward
0 new messages