tobyjoiner
Members-
Content count
8 -
Joined
-
Last visited
-
Days Won
1
Everything posted by tobyjoiner
-
Rails 3.1 And .2 Outputting Escaped Html
tobyjoiner posted a topic in FusionCharts and Ruby on Rails
I am sure that I am doing something wrong and I am guessing it is easily fixed. I have the following html outputting: Can you please point me in the right direction? <!-- START Code Block for Chart total_pl_chart --> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" height="600" id="total_pl_chart" width="800"> <param name="allowscriptaccess" value="always"></param> <param name="movie" value="/chart/MSCombi3D.swf"></param> <param name="FlashVars" value="chartWidth=800&chartHeight=600&debugmode=0&dataXML=<chart bgColor="FFFFFF" outCnvBaseFontColor="666666" caption="Total Profit / Loss" formatNumberScale="0" decimalPrecision="4" xAxisName="Month" yAxisName="Sales" numberPrefix="$" showNames="1" showValues="0" plotFillAlpha="70" numVDivLines="10" showAlternateVGridColor="1" AlternateVGridColor="e1f5ff" divLineColor="999999" baseFontColor="666666" canvasBorderThickness="1" showPlotBorder="0" plotBorderThickness="0" zgapplot="0" zdepth="120" exeTime="1.2" dynamicShading="1" YZWallDepth="5" ZXWallDepth="5" XYWallDepth="5" canvasBgColor="FBFBFB" startAngX="0" startAngY="0" endAngX="5" endAngY="-25" divLineEffect="bevel"><categories><category label="Jan" /><category label="Feb" /><category label="Mar" /><category label="Apr" /><category label="May" /><category label="Jun" /><category label="Jul" /><category label="Aug" /><category label="Sep" /><category label="Oct" /><category label="Nov" /><category label="Dec" /></categories><dataset seriesName="$3.0 Down" color="CC3333" plotBorderColor="C8A1D1" renderAs="line"><set value="235594.33638000028" /><set value="234661.98344752024" /><set value="206449.26355196006" /><set value="178837.94903696014" /><set value="85770.30343587989" /><set value="82176.69611491996" /><set value="50124.740000000005" /><set value="39938.14" /><set value="-60561.55" /><set value="12327.88" /><set value="-30806.0" /><set value="-26129.46" /></dataset><dataset seriesName="$3.0 Up" color="006633" plotBorderColor="C8A1D1" renderAs="line"><set value="389391.1363800003" /><set value="149190.54344752023" /><set value="32848.38355196008" /><set value="23637.629036960163" /><set value="24891.423435880162" /><set value="-75978.62388507996" /><set value="-80150.26000000001" /><set value="-108996.86" /><set value="-105919.05" /><set value="-105032.12" /><set value="11681.5" /><set value="21870.54" /></dataset><dataset seriesName="Current" color="3366CC" plotBorderColor="C8A1D1" renderAs="line"><set value="312492.73638000025" /><set value="191926.26344752026" /><set value="142598.82355196006" /><set value="124187.78903696015" /><set value="47005.86343587986" /><set value="11986.53611491997" /><set value="-2150.2599999999998" /><set value="-18996.86" /><set value="-66919.05" /><set value="-42632.12" /><set value="-2718.5" /><set value="-2129.46" /></dataset></chart>&scaleMode=&lang="></param> <param name="quality" value="high"></param> <param name="wmode" value="window"></param> <param name="bgcolor" value=""></param> <embed FlashVars="chartWidth=800&chartHeight=600&debugmode=0&dataXML=<chart bgColor="FFFFFF" outCnvBaseFontColor="666666" caption="Total Profit / Loss" formatNumberScale="0" decimalPrecision="4" xAxisName="Month" yAxisName="Sales" numberPrefix="$" showNames="1" showValues="0" plotFillAlpha="70" numVDivLines="10" showAlternateVGridColor="1" AlternateVGridColor="e1f5ff" divLineColor="999999" baseFontColor="666666" canvasBorderThickness="1" showPlotBorder="0" plotBorderThickness="0" zgapplot="0" zdepth="120" exeTime="1.2" dynamicShading="1" YZWallDepth="5" ZXWallDepth="5" XYWallDepth="5" canvasBgColor="FBFBFB" startAngX="0" startAngY="0" endAngX="5" endAngY="-25" divLineEffect="bevel"><categories><category label="Jan" /><category label="Feb" /><category label="Mar" /><category label="Apr" /><category label="May" /><category label="Jun" /><category label="Jul" /><category label="Aug" /><category label="Sep" /><category label="Oct" /><category label="Nov" /><category label="Dec" /></categories><dataset seriesName="$3.0 Down" color="CC3333" plotBorderColor="C8A1D1" renderAs="line"><set value="235594.33638000028" /><set value="234661.98344752024" /><set value="206449.26355196006" /><set value="178837.94903696014" /><set value="85770.30343587989" /><set value="82176.69611491996" /><set value="50124.740000000005" /><set value="39938.14" /><set value="-60561.55" /><set value="12327.88" /><set value="-30806.0" /><set value="-26129.46" /></dataset><dataset seriesName="$3.0 Up" color="006633" plotBorderColor="C8A1D1" renderAs="line"><set value="389391.1363800003" /><set value="149190.54344752023" /><set value="32848.38355196008" /><set value="23637.629036960163" /><set value="24891.423435880162" /><set value="-75978.62388507996" /><set value="-80150.26000000001" /><set value="-108996.86" /><set value="-105919.05" /><set value="-105032.12" /><set value="11681.5" /><set value="21870.54" /></dataset><dataset seriesName="Current" color="3366CC" plotBorderColor="C8A1D1" renderAs="line"><set value="312492.73638000025" /><set value="191926.26344752026" /><set value="142598.82355196006" /><set value="124187.78903696015" /><set value="47005.86343587986" /><set value="11986.53611491997" /><set value="-2150.2599999999998" /><set value="-18996.86" /><set value="-66919.05" /><set value="-42632.12" /><set value="-2718.5" /><set value="-2129.46" /></dataset></chart>&scaleMode=&lang=" allowScriptAccess="always" bgColor="" height="600" name="total_pl_chart" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="/chart/MSCombi3D.swf" type="application/x-shockwave-flash" width="800" wmode="window"></embed> </object> -
Rails 3.1 And .2 Outputting Escaped Html
tobyjoiner replied to tobyjoiner's topic in FusionCharts and Ruby on Rails
I had to add the following to config/application.rb config.autoload_paths += %W(#{config.root}/lib) config.autoload_paths += Dir["#{config.root}/lib/**/"] It is fixed now. -
I have the following haml = render_chart '/chart/MSCombi3D.swf', '', @total_xml, "myNextHTML1", 800, 400, 0, 1 = render_chart '/chart/MSCombi3D.swf', '', @cattle_xml, "myNextHTML2", 800, 400, 0, 1 = render_chart '/chart/MSCombi3D.swf', '', @hedging_xml, "myNextHTML3", 800, 400, 0, 1 This is causing them to output as follows: myNextHTML1 myNextHTML2 myNextHTML3 myNextHTML1 myNextHTML1 myNextHTML2 myNextHTML1 myNextHTML2 myNextHTML3 I can't figure out what is going on, is there an issue with render_chart or am I just an idiot and did something wrong?
-
multiple charts duplicating
tobyjoiner replied to tobyjoiner's topic in FusionCharts and Ruby on Rails
I figured this out... If anyone else runs across this problem, just take out the = to make: = render_chart '/chart/MSCombi3D.swf', '', @total_xml, "myNextHTML1", 800, 400, 0, 1 become: render_chart '/chart/MSCombi3D.swf', '', @total_xml, "myNextHTML1", 800, 400, 0, 1 -
multiple charts duplicating
tobyjoiner replied to tobyjoiner's topic in FusionCharts and Ruby on Rails
Just to add to this: I changed it to just one chart and am still getting 2 charts showing on the page. I tried changing it to render_chart_html also. -
I have been trying to get 2 charts that are basically the same to work in the same page. I can take either one out and the other works fine, but when I have both and I try to run the function on either one of them, it only updates the first one on the page. I am sure I am just missing something easy, but can't find it. These are the 2 functions I use to call get the new chart data. chartdata.php returns xml code, and that looks fine, and like I said above, works fine with either one of the charts. This is in the head section of the page. function changeChart1Date(modDate, modLength) { chart1.setDataURL("chartdata.php?date="+modDate+"&length="+modLength); } function changeChart2Date(modDate, modLength) { chart2.setDataURL("chartdata.php?date="+modDate+"&length="+modLength); } This is in the body and obviously loads the charts to begin with. If I change the data on one of them from here they both work fine, and show separate data. Its just the reload that is broken. The code below is in the body section and has the 2 divs nearby. var chart1 = new FusionCharts("/chart/MSLine.swf", "sampleChart", "650", "300", "0", "1"); chart1.setDataURL("chartdata.php"); chart1.render("chart1div"); var chart2 = new FusionCharts("/chart/MSLine.swf", "sampleChart", "650", "300", "0", "1"); chart2.setDataURL("chartdata.php"); chart2.render("chart2div"); Thanks for any help, Toby
-
That worked perfectly. Good to know these forums have people that respond. Thank you very much Toby