Line chart: low numbers at the top?

ยอดดู 34 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

Charles Hoffman

ยังไม่อ่าน,
8 ก.พ. 2553 18:03:268/2/53
ถึง ZiYa Plugin
I have a requirement to show a line chart of rankings over time; as
such we'd like the low values to be at the top of the chart and the
high values at the bottom -- since 1 is the "highest" ranking.

One trick we've tried is to negate the numbers, so in reality the
chart shows the range from -1 (at the top) to -100 (at the bottom).
This gives the line the right shape, and even the axis tick labels
look good, but unfortunately there's a label next to each point on the
line showing its value -- and hence showing a negative number. So
where it shows that something was ranked 6th, a big fat "-6" shows up
on the chart.

Is there a better/more proper way to invert the direction of the
chart's Y-axis?

If not, is there a way to change what shows up in those big labels by
each point in each series so we can make it show a positive number
instead?

Is there a way to hide said labels altogether?

Is there a way to put tooltips on these points instead that appear
when the user mouses over the points on the line?

fernand...@gmail.com

ยังไม่อ่าน,
9 ก.พ. 2553 00:34:009/2/53
ถึง ZiYa Plugin
Hi Charles,

When you define your series, you can pass the values has a hash,
this will
allow you to either set a label or a tooltip for the actual value
you would like to be displayed.

ie chart.add :series, "fred", [ { :value => 10, :label => "Hello
10" }, ... ]
or chart.add :series, "fred", [ { :value => 10, :tooltip => "Hello
10" }, ... ]

-Fernand

Charles Hoffman

ยังไม่อ่าน,
9 ก.พ. 2553 10:20:449/2/53
ถึง ZiYa Plugin
Excellent! I don't know how I missed that you could do that, but I'm
delighted that the solution turned out to be so simple. Thank you!

On Feb 8, 11:34 pm, "fernand.gali...@gmail.com"

Soren Christensen

ยังไม่อ่าน,
9 ก.พ. 2553 01:52:519/2/53
ถึง ziya-...@googlegroups.com

Hi,

I have used the Ziya plugin previously but in this project I can not get
the GEM to work such that I can operate the server in production mode.

I have tried both the derailed-ziya from github.com which gives me
version 2.1.5 and ziya which gives me 2.1.7.

The problem arises from the initializers files. According to the
documentation you need something like:

# Pull in the ZiYa gem framework
gem "ziya", ">= 2.1.7"
require 'ziya'

# Initializes the ZiYa Framework
Ziya.initialize(
:logger => RAILS_DEFAULT_LOGGER,
:themes_dir => File.join( File.dirname(__FILE__), %w[.. .. public
charts themes])
)


But once you try to boot in production mode I get:
./script/server -e production
=> Booting Mongrel
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:443:in
`load_missing_constant': uninitialized constant Logging (NameError)
from
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in
`const_missing'
from
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in
`const_missing'
from /usr/lib64/ruby/gems/1.8/gems/logging-1.3.0/lib/logging.rb:504
from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:33

What did I overlook ? I tried the alternate version for the logger:
:logger => File.join( File.dirname(__FILE__), %w[.. log ziya.log])
but that still has the same problem.

/S

Fernand Galiana

ยังไม่อ่าน,
17 ก.พ. 2553 23:50:4317/2/53
ถึง ziya-...@googlegroups.com
Hi Soren,

  Sorry missed your post... Did you get past this ? I don't really see what is happening here. I am running the same setup 2.3.5, 1.3 and 2.1.7 without a problem. What server are u running? Do you see the same issue if you switch to dev mode on the same box ?

-Fernand


--
You received this message because you are subscribed to the Google Groups "ZiYa Plugin" group.
To post to this group, send email to ziya-...@googlegroups.com.
To unsubscribe from this group, send email to ziya-plugin...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ziya-plugin?hl=en.


Soren Christensen

ยังไม่อ่าน,
18 ก.พ. 2553 00:25:3718/2/53
ถึง ziya-...@googlegroups.com

I'm very stuck on this issue.

It prevents me from going to Production mode. So I can only debug this in dev mode.

I have:
ruby 1.8.6 (2007-06-07 patchlevel 36) [x86_64-linux]
rails (2.3.5, 2.3.4, 2.3.2, 2.2.2, 2.1.0, 2.0.2, 1.2.3)
logging (1.3.0, 1.1.0, 0.9.1)

I use Passenger and Mongrel. Both have same problems.

I initialize this way:


gem "ziya", ">= 2.1.7"
require 'ziya'

# Initializes the ZiYa Framework
#Ziya.initialize(
#  :logger      => RAILS_DEFAULT_LOGGER,
#  :logger      => File.join( File.dirname(__FILE__), %w[.. log ziya.log]),
#  :themes_dir  => File.join( File.dirname(__FILE__), %w[.. .. public charts themes])
#)

/S

Fernand Galiana

ยังไม่อ่าน,
18 ก.พ. 2553 01:04:5718/2/53
ถึง ziya-...@googlegroups.com
Hi Soren,

   Hum.... Something is causing rails to exit and forcing the at_exit callback on the logging gem to be called and at which point the Logging module has been unloaded. Is this the full stack trace ? Is the code currently in place for the ziya initializer still commented out ? Are you forking a process that may cause rails to bail out and call the exit handlers.  Also if you comment out the whole ziya initializer including the gem and require, does the app come up in production mode ?

Could you send me the full stack trace as well as the current ziya initializer ?

Thanks!
ตอบทุกคน
ตอบกลับผู้สร้าง
ส่งต่อ
ข้อความใหม่ 0 รายการ