Winter Holidays Sale 2014

FusionCharts for Dreamweaver - Developer Edition Forum


box FusionCharts for Dreamweaver - Developer Edition
FusionCharts is a Dreamweaver Charting Extension that can be used to render data-driven & animated charts for web applications and presentations. FusionChartsDW is a cross-browser and cross-platform solution that can be used with ASP.VB, PHP, and ColdFusion to deliver interactive and powerful flash charts.

Find out more about FusionCharts for Dreamweaver - Developer Edition

Thread: Caching or Session problem?

title left
User Details
message
title right
David Stoltz

post date:
2011-04-18 19:31:25
Hi,I created my chart using the wizard, but then I replaced the XML call (let's call it "page1.asp") with an ASP page like this:chartFusionChart1.setDataURL("includes/FusionCharts/data/FusionChart1_data.asp");FusionChart1_data.asp is the page that contains the query, and creates the XML in a string called strXML, which is response written out. I pass in the values from page1.asp to FusionChart1_data.asp with a session value: session("chartVar") = date1It works well like this for dynamic stuff.One HUGE problem...for whatever reason, if I sit on that page and refresh, the chart displays the correct data about 70% of the time. But the other 30% of the time, it displays the wrong data.I'm thinking this is a caching problem?Is there a way to make sure the chart completely refreshes each time?I've already added this to page1.asp:<% Response.Expires = 0Response.CacheControl = "No-cache"Response.AddHeader "pragma","no-cache"%> But it doesn't help....should I add that to the FusionChart1_data.asp page too?HELP! I'm desperate!ThanksDaveI would have attached my files, but this forum doesn't allow it...more than happy to email the files to anyone who can help.
Andrei Rinciog [Extend Studio]

post date:
2011-04-19 06:15:44
Hello,Try to place a random URL variable at the end of the data URL to make sure you don't get a cached response. Have you checked if the XML you receive is correct? Check how the XML looks each time you refresh the page and check if there are any differences between the XML when the data is correct and the XML when the data is incorrect. Try a Resonse.Write after the chart script.It's hard to believe the chart doesn't include the data correctly if that XML is the same each time. Tell me if you need more help.Regards,Andrei Rinciog
David Stoltz

post date:
2011-04-19 08:17:01
The problem is, since the data page (that includes the query and the XML) is in the flash call, response.writes are not written to the screen - they are essentially sent to the flash component....I could not figure out a way to get response.writes to go to the screen from that asp file.Which begs the question....could I somehow just include the query, and the string of XML all in the same page, with the flash component? I don't know how I would get the data into the flash component though since this is the line that brings the data in:chartFusionChart1.setDataURL("includes/FusionCharts/data/FusionChart1_data.asp");Could I do something like:chartFusionChart1.setDataURL(<%=strXML%>);Where strXML would equal the entire string of XML - would that work? It would be great if I could do everything on the same page, without having to call another page....Thanks for your help.
David Stoltz

post date:
2011-04-21 08:22:55
Any advice for above?
Horea Radu [Extend Studio]

post date:
2011-04-22 14:00:06
Hi,Instead of thischartFusionChart1.setDataURL("includes/FusionCharts/data/FusionChart1_data.asp");you could usechartFusionChart1.setDataXML(<%=strXML%>);if you want to generate the xml in the main script.Also, if you want to keep the setup with the two scripts I think you can put the xml in a session variable so that you can see it from the other script.Let me know if it worked.Best regards,Horea Radu.
David Stoltz

post date:
2011-04-22 16:46:35
Not sure what's going on...I changed my code to:chartFusionChart1.setDataXML(<%=strXML%>);Now all I see where the chart should be is "FusionCharts."I've confirmed the strXML has the string in it...I thought maybe the setDataXML needed the quotes, like:chartFusionChart1.setDataXML("<%=strXML%>");But that wasn't it...Any ideas???
David Stoltz

post date:
2011-04-22 17:04:29
If I look at the source code of the page, that line looks like:chartFusionChart1.setDataXML(<chart divLineThickness="1" yAxisMaxValue="10" useRoundEdges="1" chartTopMargin="15" yAxisValuesStep="1" chartRightMargin="15" placeValuesInside="0" divLineIsDashed="0" plotBorderDashGap="4" chartLeftMargin="15" zeroPlaneThickness="2" valuePadding="2" canvasBorderThickness="2" rotateYAxisName="1" labelDisplay="WRAP" plotBorderThickness="1" canvasBorderAlpha="100" showLabels="1" showYAxisValues="1" numDivLines="4" plotBorderDashLen="5" adjustDiv="1" rotateValues="0" zeroPlaneAlpha="75" setAdaptiveYMin="0" yAxisMinValue="" slantLabels="0" showValues="1" xAxisName="Category of Feedback" zeroPlaneColor="acbb99" plotBorderColor="333333" showLimits="1" alternateHGridColor="eeeeee" xAxisNamePadding="5" plotFillAngle="0" plotFillRatio="0,100" plotFillAlpha="100,100" plotGradientColor="ffffff" staggerLines="2" yAxisName="Feedback Rating" alternateHGridAlpha="50" rotateLabels="1" showPlotBorder="1" plotBorderAlpha="95" chartBottomMargin="15" yAxisNamePadding="5" showAlternateHGridColor="1" plotBorderDashed="0" labelPadding="3" divLineAlpha="100" labelStep="1" yAxisValuesPadding="2" showShadow="1" divLineColor="acbb99" canvasBorderColor="545454" captionPadding="10" canvasBgAlpha="100" canvasBgColor="dde3d5" plotSpacePercent="20" showDivLineValues="1" seriesNameInTooltip="1" defaultNumberScale="" decimalSeparator="." baseFontSize="10" logoPosition="TL" showExportDataMenuItem="0" outCnvBaseFont="Verdana" thousandSeparator="," defaultAnimation="1" yAxisValueDecimals="2" clickURL="" numberPrefix="" aboutMenuItemLink="http://www.site.com/profile.asp" bgAlpha="100" bgColor="ffffcc" bgSWF="" bgSWFAlpha="100" forceDecimals="0" animation="1" decimals="2" outCnvBaseFontColor="49563a" aboutMenuItemLabel="Back to Profile" logoLink="" toolTipSepChar=", " formatNumber="1" showAboutMenuItem="1" toolTipBorderColor="49563a" toolTipBgColor="ffffff" baseFontColor="49563a" numberSuffix="" logoAlpha="100" numberScaleUnit="K,M" caption="Results" subCaption="As of 4/22/2011" showToolTip="1" formatNumberScale="1" logoScale="100" outCnvBaseFontSize="10" exportEnabled="0" showBorder="0" numberScaleValue="1000,1000" logoURL="" baseFont="Verdana" exportHandler="fc_exp_FusionChart1"><set label="Data" value="8"/><set label="Data" value="2"/><set label="Data" value="7.5"/><set label="Data" value="8"/><set label="Data" value="8.5"/><set label="Data" value="10"/><set label="Data" value="9"/></chart>);
David Stoltz

post date:
2011-04-22 17:32:35
I fixed it.Needed quotes like:chartFusionChart1.setDataXML("<%=strXML%>"); and also had to replace all the double quotes in the string with single quotes.