Comments on: Open Flash Chart II – Multiple graphs on the same page http://pullmonkey.com/2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page/ Sat, 16 Oct 2010 03:27:21 +0000 hourly 1 https://wordpress.org/?v=5.6 By: Seesaw http://pullmonkey.com/2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page/comment-page-1/#comment-15178 Sat, 16 Oct 2010 03:27:21 +0000 /2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page#comment-15178 Hi Charlie,

I sent you a direct e-mail a couple of days ago with a pastie link attached. Let me know if you’d like me to resend or if I can get you the code some other way. Thank you.

]]>
By: charlie http://pullmonkey.com/2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page/comment-page-1/#comment-14920 Tue, 12 Oct 2010 00:32:46 +0000 /2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page#comment-14920 In reply to Seesaw.

Hey Seesaw – Let’s figure this out – just need a snippet of code from you (gist or pastie link would be fine). I need something I can use to reproduce the problem.
Thank you.

]]>
By: Seesaw http://pullmonkey.com/2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page/comment-page-1/#comment-14879 Sat, 09 Oct 2010 10:11:03 +0000 /2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page#comment-14879 Sorry, divs got cut off!

swfobject.embedSWF(
“/open-flash-chart.swf”,”flashcontent_913000″,
“440”, “310”, “9.0.0”, “expressInstall.swf”,
{“data-file”:”/analytics%2Fpie”}, {}, {} );

swfobject.embedSWF(
“/open-flash-chart.swf”,”flashcontent_913000″,
“440”, “310”, “9.0.0”, “expressInstall.swf”,
{“data-file”:”/analytics%2Fpile”}, {}, {} );

]]>
By: Seesaw http://pullmonkey.com/2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page/comment-page-1/#comment-14878 Sat, 09 Oct 2010 10:09:30 +0000 /2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page#comment-14878 Hi Charlie,

I think I’m having a similar problem to Nick. I’m using OFC2 (recently installed) on Rails 3, Ruby 1.9.2. I can get one graph to display correctly per page, but when I add that second declaration in my view, they both fail. Page source: both IDs are identical.

swfobject.embedSWF(
“/open-flash-chart.swf”,”flashcontent_913000″,
“440”, “310”, “9.0.0”, “expressInstall.swf”,
{“data-file”:”/analytics%2Fpie”}, {}, {} );

swfobject.embedSWF(
“/open-flash-chart.swf”,”flashcontent_913000″,
“440”, “310”, “9.0.0”, “expressInstall.swf”,
{“data-file”:”/analytics%2Fpile”}, {}, {} );

I’m not too experienced with all this, so how can I fix this particular problem? Thank you very much.

]]>
By: Xavier Noria http://pullmonkey.com/2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page/comment-page-1/#comment-728 Mon, 04 Aug 2008 16:56:00 +0000 /2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page#comment-728 Hi! Is BarStackValue missing? I’d need that class to set the colour of the rectangles in a stacked bar chart. Tried BarValue + set_colour but seems that BarStack does not accept BarValues.

]]>
By: charlie http://pullmonkey.com/2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page/comment-page-1/#comment-729 Mon, 04 Aug 2008 16:56:00 +0000 /2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page#comment-729 @Xavier N. – yes it was missing … sorry about that, see if that (the latest commits as of this comment) works for you.

]]>
By: Xavier Noria http://pullmonkey.com/2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page/comment-page-1/#comment-730 Mon, 04 Aug 2008 16:56:00 +0000 /2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page#comment-730 Man you rock, it couldn’t be quicker. Working like a charm thank you!

]]>
By: Xavier Noria http://pullmonkey.com/2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page/comment-page-1/#comment-731 Mon, 04 Aug 2008 16:56:00 +0000 /2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page#comment-731 Is there a way to set the tooltip of each rectangle? BarStackValue#set_tooltip seems to have no effect.

]]>
By: charlie http://pullmonkey.com/2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page/comment-page-1/#comment-732 Mon, 04 Aug 2008 16:56:00 +0000 /2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page#comment-732 @Xavier N. – Sorry but there does not seem to be a way to set tooltips by rectangle, neither BarStack nor BarStackValue seem to support tooltips in the swf … I will keep looking though.

]]>
By: Nick http://pullmonkey.com/2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page/comment-page-1/#comment-733 Mon, 04 Aug 2008 16:56:00 +0000 /2008/08/04/open-flash-chart-ii-multiple-graphs-on-the-same-page#comment-733 This does NOT work for me. Only the last graph I put in the view is displayed, but in the page source, both appear.

In a new sample project:

rails test
script/generate controller test
-> (OFC2 install instructions)

index.rhtml:

<filter:code attributes=lang="ruby">
<script type="text/javascript" src="/javascripts/swfobject.js"></script>
<%= @graph1 %><br/>
<%= @graph2 %><br/>
</filter:code>

test_controller.rb:

<filter:code attributes=lang="ruby">
class TestController < ApplicationController

def index
@graph1 = open_flash_chart_object(600,300,"/test/graph1")
@graph2 = open_flash_chart_object(600,300,"/test/graph2")
end

def graph1
title = Title.new("Pie Chart Example For Chipster")

pie = Pie.new
pie.start_angle = 35
pie.animate = true
pie.tooltip = ‘#val# of #total#<br>#percent# of 100%’
pie.colours = ["#d01f3c", "#356aa0", "#C79810"]
pie.values = [2,3, PieValue.new(6.5,"Hello (6.5)")]

chart = OpenFlashChart.new
chart.title = title
chart.add_element(pie)

chart.x_axis = nil

render :text => chart.to_s

end

def graph2
title = Title.new("MY TITLE")
bar = BarGlass.new
bar.set_values([1,2,3,4,5,6,7,8,9])
chart = OpenFlashChart.new
chart.set_title(title)
chart.add_element(bar)
render :text => chart.to_s

end

end
</filter:code>

http://localhost:3000/test/ only displays the last bar graph. Why?

]]>