Comments on: Open Flash Chart II – Point by Point plotting http://pullmonkey.com/2008/08/18/open-flash-chart-ii-point-by-point-plotting/ Fri, 03 Sep 2010 22:09:42 +0000 hourly 1 https://wordpress.org/?v=5.6 By: Gabriel Peplau Hahn http://pullmonkey.com/2008/08/18/open-flash-chart-ii-point-by-point-plotting/comment-page-1/#comment-13313 Fri, 03 Sep 2010 22:09:42 +0000 /2008/08/18/open-flash-chart-ii-point-by-point-plotting#comment-13313 Hi there,

I need to put the values at my chart as a static tooltip, directly on the chart without needing a hover action.
Somebody knows how?

]]>
By: Stuart http://pullmonkey.com/2008/08/18/open-flash-chart-ii-point-by-point-plotting/comment-page-1/#comment-767 Mon, 18 Aug 2008 17:21:00 +0000 /2008/08/18/open-flash-chart-ii-point-by-point-plotting#comment-767 Charlie, I copied your example into my controller and created the class ScatterValue:

class ScatterValue < OpenFlashChart
def initialize(x_value, y_value, dot_size=10)
@x = x_value
@y = y_value
@dot_size = dot_size
end
end

And it all worked like a peach. Trying to apply the same to a line chart, though, and I can’t seem to get the same results. Any tips on an initialize method for a LineValue class (or something similar?) Thanks for your help.

-Stuart

]]>
By: charlie http://pullmonkey.com/2008/08/18/open-flash-chart-ii-point-by-point-plotting/comment-page-1/#comment-768 Mon, 18 Aug 2008 17:21:00 +0000 /2008/08/18/open-flash-chart-ii-point-by-point-plotting#comment-768 @Stuart – oh man! sorry about that, fixed it in my own code to get the scatter graphs working but completely forgot to commit it. Glad you were able to figure it out 🙂

I will work out the LineValue stuff tomorrow morning and get back to you.

]]>
By: Nathan Leavitt http://pullmonkey.com/2008/08/18/open-flash-chart-ii-point-by-point-plotting/comment-page-1/#comment-769 Mon, 18 Aug 2008 17:21:00 +0000 /2008/08/18/open-flash-chart-ii-point-by-point-plotting#comment-769 Hey.. Charlie,

First off, great work on the plugin!

I do have a question regarding the set_num_decimals. Is there a way that I can use that to set the number of decimals on each bar to 2. I’m using my bar chart to display money values and can’t figure out how to display with 2 decimals.

Thanks!

]]>
By: charlie http://pullmonkey.com/2008/08/18/open-flash-chart-ii-point-by-point-plotting/comment-page-1/#comment-770 Mon, 18 Aug 2008 17:21:00 +0000 /2008/08/18/open-flash-chart-ii-point-by-point-plotting#comment-770 @Nathan L. – I don’t see that it is part of OFC II. It was in OFC I.
For now, you can at least round in ruby, check this out – http://www.hans-eric.com/code-samples/ruby-floating-point-round-off/

]]>
By: Mark http://pullmonkey.com/2008/08/18/open-flash-chart-ii-point-by-point-plotting/comment-page-1/#comment-771 Mon, 18 Aug 2008 17:21:00 +0000 /2008/08/18/open-flash-chart-ii-point-by-point-plotting#comment-771 Charlie, thanks for all the cool work!

Just started using openflashchart2 in a Rails 2.0.2 app, but ran into a weird infinite loop when preparing the chart data (page has a couple of your simple Bar chart samples). Eventually the stack blows:

stack level too deep
[RAILS_ROOT]/vendor/plugins/open_flash_chart/lib/open_flash_chart.rb:23:in `to_s’
[RAILS_ROOT]/vendor/plugins/open_flash_chart/lib/open_flash_chart.rb:23:in `to_json’

… hundreds more like this …

[RAILS_ROOT]/vendor/plugins/open_flash_chart/lib/open_flash_chart.rb:23:in `to_s’
[RAILS_ROOT]/vendor/plugins/open_flash_chart/lib/open_flash_chart.rb:23:in `to_json’
[RAILS_ROOT]/vendor/plugins/open_flash_chart/lib/open_flash_chart.rb:23:in `to_s’
[RAILS_ROOT]/app/controllers/test_it_controller.rb:37:in `graph_one’

I happened to start using the built-in Ruby 1.8.6 csv library the same day this started cropping up, but that’s about the only coincidental change I can relate this to.

I’m guessing some metaprogramming magic may be involved, but I have no clue how to debug it further.

Thanks for any tips!

]]>
By: syl http://pullmonkey.com/2008/08/18/open-flash-chart-ii-point-by-point-plotting/comment-page-1/#comment-772 Mon, 18 Aug 2008 17:21:00 +0000 /2008/08/18/open-flash-chart-ii-point-by-point-plotting#comment-772 @charlie – Can I insert an image background to the graph? or is it not yet ported?

]]>
By: charlie http://pullmonkey.com/2008/08/18/open-flash-chart-ii-point-by-point-plotting/comment-page-1/#comment-773 Mon, 18 Aug 2008 17:21:00 +0000 /2008/08/18/open-flash-chart-ii-point-by-point-plotting#comment-773 @Mark –

Instead of doing render :text => chart.to_s just do
render :text => chart.to_json .. I guess it depends on your environment, never seen this problem before.

@syl – I will take a look and post an example.

]]>
By: charlie http://pullmonkey.com/2008/08/18/open-flash-chart-ii-point-by-point-plotting/comment-page-1/#comment-774 Mon, 18 Aug 2008 17:21:00 +0000 /2008/08/18/open-flash-chart-ii-point-by-point-plotting#comment-774 @syl – I see where it was implemented in OFC I – http://teethgrinder.co.uk/open-flash-chart/gallery-bg-image.php

You mention that I should port it, maybe I missed it. Where did you see it for OFC II?

]]>
By: syl http://pullmonkey.com/2008/08/18/open-flash-chart-ii-point-by-point-plotting/comment-page-1/#comment-775 Mon, 18 Aug 2008 17:21:00 +0000 /2008/08/18/open-flash-chart-ii-point-by-point-plotting#comment-775 @charlie – Exact!! it is not implemented in OFC II… I think that if it was in OFCI it will be enabled in OFCII.

Sorry for that mistake. But do you think, I can ask to OFCII to implement that because I really need it..

]]>