pdaniel
Members-
Content count
16 -
Joined
-
Last visited
-
Days Won
1
About pdaniel
-
Rank
Junior Member
-
Fusioncharts._Fallbackjschartwhennoflash() Not Working As Expected
pdaniel replied to pdaniel's topic in Javascript Problems
I'm getting the sense that it may not be possible to use the _Fallbackjschartwhennoflash() with the RenderChartHTML?? Is this true? -
Fusioncharts._Fallbackjschartwhennoflash() Not Working As Expected
pdaniel replied to pdaniel's topic in Javascript Problems
I can render the chart no problem with this data if I use the RenderChartHTML function so I can't believe that it is the data. I also only want the chart to render in javascript if no flash is found. I don't want to render in javascript 100% of the time. Is that what your suggestion will do? -
Fusioncharts._Fallbackjschartwhennoflash() Not Working As Expected
pdaniel replied to pdaniel's topic in Javascript Problems
The error I'm getting is as follows: Info: Chart loaded and initialized. Initial Width: 175 Initial Height: 175 Scale Mode: noScale Debug Mode: Yes Application Message Language: EN Version: 3.2.1 Chart Type: 2D Pie Chart Chart Objects: BACKGROUND CANVAS CAPTION SUBCAPTION DATALABELS DATAPLOT TOOLTIP LEGEND INFO: Chart registered with external script. DOM Id of chart is AssetClassChartControl INFO: XML Data provided using dataXML method. XML Data: %3cchart+showFCMenuItem%3d'0'+plotGradientColor%3d''+captionPadding%3d'0'+chartTopMargin%3d'0'+chartBottomMargin%3d'0'+chartLeftMargin%3d'0'+chartRightMargin%3d'0'+showBorder%3d'0'+scaleMode%3d'exactFit'+numberPrefix%3d'%24'+bgColor%3d'%23FFFFFF'+formatNumberScale%3d'0'+showLabels%3d'0'+showValues%3d'0'+borderThickness%3d'0'+animation%3d'1'+numVisiblePlot%3d'8'%3e%3cset+label%3d'Fixed+Income'+value%3d'936238.150897'+color%3d'%235485BC'+tooltext%3d'Fixed+Income%26lt%3bBR%26gt%3b%24936%2c238.15%26lt%3bBR%26gt%3b96.28%25'%2f%3e%3cset+label%3d'Domestic+Equity'+value%3d'426777.3510413'+color%3d'%23AA8C30'+tooltext%3d'Domestic+Equity%26lt%3bBR%26gt%3b%24426%2c777.35%26lt%3bBR%26gt%3b43.89%25'%2f%3e%3cset+label%3d'International+Equity'+value%3d'134843.8245006'+color%3d'%235C9384'+tooltext%3d'International+Equity%26lt%3bBR%26gt%3b%24134%2c843.82%26lt%3bBR%26gt%3b13.87%25'%2f%3e%3cset+label%3d'Other'+value%3d'32431.8859485'+color%3d'%23981A37'+tooltext%3d'Other%26lt%3bBR%26gt%3b%2432%2c431.89%26lt%3bBR%26gt%3b3.34%25'%2f%3e%3cset+label%3d'Cash+and+Equivalents'+value%3d'-557907.1431868'+color%3d'%23FCB319'+tooltext%3d'Cash+and+Equivalents%26lt%3bBR%26gt%3b(%24557%2c907.14)%26lt%3bBR%26gt%3b-57.38%25'%2f%3e%3cstyles%3e%3cdefinition%3e%3cstyle+name%3d'myHTMLFont'+type%3d'font'+isHTML%3d'1'+%2f%3e%3c%2fdefinition%3e%3capplication%3e%3capply+toObject%3d'TOOLTIP'+styles%3d'myHTMLFont'+%2f%3e%3c%2fapplication%3e%3c%2fstyles%3e%3c%2fchart%3e No Data to Display: No data was found in the XML data document provided. Possible cases can be: There isn't any data generated by your system. If your system generates data based on parameters passed to it using dataURL, please make sure dataURL is URL Encoded. You might be using a Single Series Chart .swf file instead of Multi-series .swf file and providing multi-series data or vice-versa. I pass in the data via an XML string that executes the following function in FusionCharts.cs. This same XML works when calling the RenderChartHTML method. Any thoughts? private static string RenderChartALL(string chartSWF, string dataUrl, string dataStr, string chartId, string chartWidth, string chartHeight, bool debugMode, bool registerWithJS, bool allowTransparent, string bgColor, string scaleMode, string language) { __INIT(); // string dataprovider_js_code; SetConfiguration("debugMode", boolToNum(debugMode)); SetConfiguration("registerWithJS", boolToNum(true)); // setup debug mode js parameter int debugMode_js_param = boolToNum(debugMode); // setup register with js js parameter int registerWithJS_js_param = boolToNum(true); string dataFormat = GetConfiguration("dataFormat"); dataFormat = (dataFormat == "" ? "xml" + (dataStr == "" ? "url" : "") : dataFormat + (dataStr == "" ? "url" : "")); if (GetConfiguration("renderAt") == "") SetConfiguration("renderAt", chartId + "Div"); string wmode = GetConfiguration("wMode"); if (wmode.Trim() == "" || wmode == null) { wmode = allowTransparent ? "transparent" : "opaque"; } SetConfiguration("swfUrl", chartSWF); SetConfiguration("dataFormat", dataFormat); SetConfiguration("id", chartId); SetConfiguration("width", chartWidth); SetConfiguration("height", chartHeight); SetConfiguration("wMode", wmode); string dataSource = (dataStr == "" ? dataUrl : dataStr.Replace("\n\r", "")); string dataSourceJSON = "\"dataSource\" : " + (dataFormat == "json" ? dataSource : "\"" + dataSource + "\""); string chartConfigJSON = "{" + fc_encodeJSON(GetConfigurationGroup("params"), false) + "," + dataSourceJSON + "}"; StringBuilder builder = new StringBuilder(); builder.AppendFormat("<!-- START Script Block for Chart {0} -->" + Environment.NewLine, chartId); builder.AppendFormat("<div id='{0}Div' >" + Environment.NewLine, chartId); builder.Append("Chart." + Environment.NewLine); builder.Append("</div>" + Environment.NewLine); builder.Append("<script type=\"text/javascript\">" + Environment.NewLine); builder.Append("FusionCharts.debugMode.enabled(true);" + Environment.NewLine); builder.AppendFormat("var chart_{0} = new FusionCharts({1}).render();", chartId, chartConfigJSON); builder.Append("</script>" + Environment.NewLine); builder.AppendFormat("<!-- END Script Block for Chart {0} -->" + Environment.NewLine, chartId); // Re-Initializing... __fc__initialize__(); return builder.ToString(); } -
Fusioncharts._Fallbackjschartwhennoflash() Not Working As Expected
pdaniel replied to pdaniel's topic in Javascript Problems
So I tried calling the Renderchart method and I get javascript errors now. I get the following message.. "Microsoft JScript runtime error: There was an error rendering the chart. Enable FusionCharts JS debugMode for more information." .I set the debugmode='1' but I still can't get rid of this message. I'm hesitant to contineu down this RenderChart method with the issues I'm hitting (unless I absolutely have to, to utilize the _Fallbackjschartwhennoflash. -
Fusioncharts._Fallbackjschartwhennoflash() Not Working As Expected
pdaniel replied to pdaniel's topic in Javascript Problems
Does RenderChartHTML not handle _Fallbackjschartwhennoflash()? I believe we had called RenderChartHTML versus RenderChartt for a specific reason. I'm afraid by switching it, it could cause other issues. Is that the only way this works? -
Fusioncharts._Fallbackjschartwhennoflash() Not Working As Expected
pdaniel replied to pdaniel's topic in Javascript Problems
Not sure if this help as well, but when I step through the FusionCharts.cs file function, the following function returns back the variable value below it. As you can see I added in the FusionCharts._fallbackJSChartWhenNoFlash(); javascript code. Does this look correct? private static string RenderChartHTMLALL(string chartSWF, string dataUrl, string dataStr, string chartId, string chartWidth, string chartHeight, bool debugMode, bool registerWithJS, bool allowTransparent, string bgColor, string scaleMode, string language) { __INIT(); string wmode = GetConfiguration("wMode"); if (wmode.Trim() == "" || wmode == null) { wmode = allowTransparent ? "transparent" : "opaque"; } SetConfiguration("movie", chartSWF); SetConfiguration("src", chartSWF); SetConfiguration("dataXML", dataStr); SetConfiguration("dataURL", dataUrl); SetConfiguration("width", chartWidth); SetConfiguration("height", chartHeight); SetConfiguration("chartWidth", chartWidth); SetConfiguration("chartHeight", chartHeight); SetConfiguration("DOMId", chartId); SetConfiguration("id", chartId); SetConfiguration("debugMode", boolToNum(debugMode)); SetConfiguration("wMode", wmode); string strFlashVars = FC_Transform(GetConfigurationGroup("fvars"), "&{key}={value}", true); SetConfiguration("flashvars", strFlashVars); string strObjectNode = "<object " + FC_Transform(GetConfigurationGroup("object"), " {key}=\"{value}\"", true) + " >\n"; string strObjectParamsNode = FC_Transform(GetConfigurationGroup("objparams"), "\t<param name=\"{key}\" value=\"{value}\">\n", true); string strEmbedNode = "<embed " + FC_Transform(GetConfigurationGroup("embed"), " {key}=\"{value}\"", true) + " />\n"; StringBuilder htmlcodes = new StringBuilder(); htmlcodes.AppendFormat("<!-- START Code Block for Chart {0} -->" + Environment.NewLine, chartId); htmlcodes.Append("<script type=\"text/javascript\">" + Environment.NewLine); htmlcodes.Append("FusionCharts._fallbackJSChartWhenNoFlash();" + Environment.NewLine); htmlcodes.Append("</script>" + Environment.NewLine); htmlcodes.Append(strObjectNode + Environment.NewLine); htmlcodes.Append(strObjectParamsNode + Environment.NewLine); htmlcodes.Append(strEmbedNode + Environment.NewLine); htmlcodes.AppendFormat("</object>\n<!-- END Code Block for Chart {0} -->" + Environment.NewLine, chartId); // Re-Initializing... __fc__initialize__(); //builder.Append("FusionCharts._fallbackJSChartWhenNoFlash();" + Environment.NewLine); //string strHTML = "<script type=\"text/javascript\"><!--\n FusionCharts._fallbackJSChartWhenNoFlash();\n// --></script>"; //return (strHTML); return htmlcodes.ToString(); } The htmlcodes.ToString(); equals to..... {<!-- START Code Block for Chart AssetCategoryChartControl --> <script type="text/javascript"> FusionCharts._fallbackJSChartWhenNoFlash(); </script> <object id="AssetCategoryChartControl" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" height="175" width="175" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" > <param name="movie" value="/Applications/App360/WebResource.axd?d=roNKrhcPxj01Eas7TpmjUDPIMaM2V_ezJ1Bo2R-D-F7ysNkiGcf-9nEay0EuMV8hG1tZjMv_3QwiKDOZseQeVz8NsXvsOWzE2bCZKZkQvjsl7RaYAxNWVdNEkptOpvyfaeEQXVpfSn9LltHxG5GZyVeOm4ck5fQoOH8366vxWxsiIhNE0&t=634371695920520834"> <param name="FlashVars" value="®isterWithJS=1&chartHeight=175&DOMId=AssetCategoryChartControl&dataXML=%3cchart+showFCMenuItem%3d'0'+plotGradientColor%3d''+captionPadding%3d'0'+chartTopMargin%3d'0'+chartBottomMargin%3d'0'+chartLeftMargin%3d'0'+chartRightMargin%3d'0'+showBorder%3d'0'+scaleMode%3d'exactFit'+bgColor%3d'%23FFFFFF'+formatNumberScale%3d'0'+showLabels%3d'0'+showValues%3d'0'+borderThickness%3d'0'+animation%3d'1'+numVisiblePlot%3d'8'%3e%3cset+label%3d'Muni+Single+State'+value%3d'779238.0416'+color%3d'%235485BC'+tooltext%3d'Muni+Single+State%26lt%3bBR%26gt%3b%24779%2c238.04%26lt%3bBR%26gt%3b80.51%25'%2f%3e%3cset+label%3d'Large-Cap+Value'+value%3d'126091.8695'+color%3d'%23AA8C30'+tooltext%3d'Large-Cap+Value%26lt%3bBR%26gt%3b%24126%2c091.87%26lt%3bBR%26gt%3b13.03%25'%2f%3e%3cset+label%3d'High-Yield+Muni'+value%3d'74267.3932'+color%3d'%235C9384'+tooltext%3d'High-Yield+Muni%26lt%3bBR%26gt%3b%2474%2c267.39%26lt%3bBR%26gt%3b7.67%25'%2f%3e%3cset+label%3d'Large-Cap+Blend'+value%3d'55190.8443'+color%3d'%23981 A37'+tooltext%3d'Large-Cap+Blend%26lt%3bBR%26gt%3b%2455%2c190.84%26lt%3bBR%26gt%3b5.70%25'%2f%3e%3cset+label%3d'World+Allocation'+value%3d'41942.0204'+color%3d'%23FCB319'+tooltext%3d'World+Allocation%26lt%3bBR%26gt%3b%2441%2c942.02%26lt%3bBR%26gt%3b4.33%25'%2f%3e%3cset+label%3d'Small-Cap+Blend'+value%3d'40349.7912'+color%3d'%2386A033'+tooltext%3d'Small-Cap+Blend%26lt%3bBR%26gt%3b%2440%2c349.79%26lt%3bBR%26gt%3b4.17%25'%2f%3e%3cset+label%3d'Sector+Fund'+value%3d'39610'+color%3d'%23614931'+tooltext%3d'Sector+Fund%26lt%3bBR%26gt%3b%2439%2c610.00%26lt%3bBR%26gt%3b4.09%25'%2f%3e%3cset+label%3d'World+Stock'+value%3d'39243.3086'+color%3d'%2300526F'+tooltext%3d'World+Stock%26lt%3bBR%26gt%3b%2439%2c243.31%26lt%3bBR%26gt%3b4.05%25'%2f%3e%3cset+label%3d'Small-Cap+Value'+value%3d'38895.6'+color%3d'%23594266'+tooltext%3d'Small-Cap+Value%26lt%3bBR%26gt%3b%2438%2c895.60%26lt%3bBR%26gt%3b4.02%25'%2f%3e%3cset+label%3d'Real+Estate'+value%3d'36996.5856'+color%3d'%23CB6828'+tooltext%3d'Real+Estate%26lt%3bBR%26gt%3b%2436%2c996.59% 26lt%3bBR%26gt%3b3.82%25'%2f%3e%3cset+label%3d'High-Yield+Bond'+value%3d'34314.9926'+color%3d'%23AAAAAB'+tooltext%3d'High-Yield+Bond%26lt%3bBR%26gt%3b%2434%2c314.99%26lt%3bBR%26gt%3b3.55%25'%2f%3e%3cset+label%3d'Remaining'+value%3d'259107.852'+color%3d'%23A89375'+tooltext%3d'Remaining%26lt%3bBR%26gt%3b%24259%2c107.85%26lt%3bBR%26gt%3b16.55%25'%2f%3e%3cstyles%3e%3cdefinition%3e%3cstyle+name%3d'myHTMLFont'+type%3d'font'+isHTML%3d'1'+%2f%3e%3c%2fdefinition%3e%3capplication%3e%3capply+toObject%3d'TOOLTIP'+styles%3d'myHTMLFont'+%2f%3e%3c%2fapplication%3e%3c%2fstyles%3e%3c%2fchart%3e〈=EN&scaleMode=noScale&chartWidth=175&debugMode=0"> <param name="wMode" value="transparent"> <param name="allowScriptAccess" value="always"> <param name="quality" value="best"> <param name="scaleMode" value="noScale"> <embed src="/Applications/App360/WebResource.axd?d=roNKrhcPxj01Eas7TpmjUDPIMaM2V_ezJ1Bo2R-D-F7ysNkiGcf-9nEay0EuMV8hG1tZjMv_3QwiKDOZseQeVz8NsXvsOWzE2bCZKZkQvjsl7RaYAxNWVdNEkptOpvyfaeEQXVpfSn9LltHxG5GZyVeOm4ck5fQoOH8366vxWxsiIhNE0&t=634371695920520834" pluginspage="http://www.macromedia.com/go/getflashplayer" width="175" type="application/x-shockwave-flash" wMode="transparent" id="AssetCategoryChartControl" scaleMode="noScale" quality="best" flashvars="®isterWithJS=1&chartHeight=175&DOMId=AssetCategoryChartControl&dataXML=%3cchart+showFCMenuItem%3d'0'+plotGradientColor%3d''+captionPadding%3d'0'+chartTopMargin%3d'0'+chartBottomMargin%3d'0'+chartLeftMargin%3d'0'+chartRightMargin%3d'0'+showBorder%3d'0'+scaleMode%3d'exactFit'+bgColor%3d'%23FFFFFF'+formatNumberScale%3d'0'+showLabels%3d'0'+showValues%3d'0'+borderThickness%3d'0'+animation%3d'1'+numVisiblePlot%3d'8'%3e%3cset+label%3d'Muni+Single+State'+value%3d'779238.0416'+color%3d'%235485BC'+tooltext%3d'Muni+Single+State%26lt%3bBR%26gt%3b%24779%2c238.04%26lt%3bBR% 26gt%3b80.51%25'%2f%3e%3cset+label%3d'Large-Cap+Value'+value%3d'126091.8695'+color%3d'%23AA8C30'+tooltext%3d'Large-Cap+Value%26lt%3bBR%26gt%3b%24126%2c091.87%26lt%3bBR%26gt%3b13.03%25'%2f%3e%3cset+label%3d'High-Yield+Muni'+value%3d'74267.3932'+color%3d'%235C9384'+tooltext%3d'High-Yield+Muni%26lt%3bBR%26gt%3b%2474%2c267.39%26lt%3bBR%26gt%3b7.67%25'%2f%3e%3cset+label%3d'Large-Cap+Blend'+value%3d'55190.8443'+color%3d'%23981A37'+tooltext%3d'Large-Cap+Blend%26lt%3bBR%26gt%3b%2455%2c190.84%26lt%3bBR%26gt%3b5.70%25'%2f%3e%3cset+label%3d'World+Allocation'+value%3d'41942.0204'+color%3d'%23FCB319'+tooltext%3d'World+Allocation%26lt%3bBR%26gt%3b%2441%2c942.02%26lt%3bBR%26gt%3b4.33%25'%2f%3e%3cset+label%3d'Small-Cap+Blend'+value%3d'40349.7912'+color%3d'%2386A033'+tooltext%3d'Small-Cap+Blend%26lt%3bBR%26gt%3b%2440%2c349.79%26lt%3bBR%26gt%3b4.17%25'%2f%3e%3cset+label%3d'Sector+Fund'+value%3d'39610'+color%3d'%23614931'+tooltext%3d'Sector+Fund%26lt%3bBR%26gt%3b%2439%2c610.00%26lt%3bBR%26gt%3b4.09%25'%2f%3e%3cset+label%3d'World +Stock'+value%3d'39243.3086'+color%3d'%2300526F'+tooltext%3d'World+Stock%26lt%3bBR%26gt%3b%2439%2c243.31%26lt%3bBR%26gt%3b4.05%25'%2f%3e%3cset+label%3d'Small-Cap+Value'+value%3d'38895.6'+color%3d'%23594266'+tooltext%3d'Small-Cap+Value%26lt%3bBR%26gt%3b%2438%2c895.60%26lt%3bBR%26gt%3b4.02%25'%2f%3e%3cset+label%3d'Real+Estate'+value%3d'36996.5856'+color%3d'%23CB6828'+tooltext%3d'Real+Estate%26lt%3bBR%26gt%3b%2436%2c996.59%26lt%3bBR%26gt%3b3.82%25'%2f%3e%3cset+label%3d'High-Yield+Bond'+value%3d'34314.9926'+color%3d'%23AAAAAB'+tooltext%3d'High-Yield+Bond%26lt%3bBR%26gt%3b%2434%2c314.99%26lt%3bBR%26gt%3b3.55%25'%2f%3e%3cset+label%3d'Remaining'+value%3d'259107.852'+color%3d'%23A89375'+tooltext%3d'Remaining%26lt%3bBR%26gt%3b%24259%2c107.85%26lt%3bBR%26gt%3b16.55%25'%2f%3e%3cstyles%3e%3cdefinition%3e%3cstyle+name%3d'myHTMLFont'+type%3d'font'+isHTML%3d'1'+%2f%3e%3c%2fdefinition%3e%3capplication%3e%3capply+toObject%3d'TOOLTIP'+styles%3d'myHTMLFont'+%2f%3e%3c%2fapplication%3e%3c%2fstyles%3e%3c%2fchart%3e〈=EN&scaleMod e=noScale&chartWidth=175&debugMode=0" allowScriptAccess="always" height="175" /> </object> <!-- END Code Block for Chart AssetCategoryChartControl --> } Capacity: 7002 Length: 6730 MaxCapacity: 2147483647 -
Fusioncharts._Fallbackjschartwhennoflash() Not Working As Expected
pdaniel replied to pdaniel's topic in Javascript Problems
I just stepped through the FusionCharts.cs file in debug mode and it appears the code above does not get executed (RenderChartALL function). I assume this is why it's not working. Which function should I place the fallbackJSChartWhenNoFlash line of code in order for it to execute before the chart renders? when stepping through the code, the following function gets executed.. public static string RenderChartHTML(string chartSWF, string dataUrl, string dataStr, string chartId, string chartWidth, string chartHeight, bool debugMode, bool registerWithJS, bool allowTransparent) { return RenderChartHTMLALL(chartSWF, dataUrl, dataStr, chartId, chartWidth, chartHeight, debugMode, registerWithJS, allowTransparent, "", "noScale", "EN"); } which then calls private static string RenderChartHTMLALL(string chartSWF, string dataUrl, string dataStr, string chartId, string chartWidth, string chartHeight, bool debugMode, bool registerWithJS, bool allowTransparent, string bgColor, string scaleMode, string language) { __INIT(); string wmode = GetConfiguration("wMode"); if (wmode.Trim() == "" || wmode == null) { wmode = allowTransparent ? "transparent" : "opaque"; } SetConfiguration("movie", chartSWF); SetConfiguration("src", chartSWF); SetConfiguration("dataXML", dataStr); SetConfiguration("dataURL", dataUrl); SetConfiguration("width", chartWidth); SetConfiguration("height", chartHeight); SetConfiguration("chartWidth", chartWidth); SetConfiguration("chartHeight", chartHeight); SetConfiguration("DOMId", chartId); SetConfiguration("id", chartId); SetConfiguration("debugMode", boolToNum(debugMode)); SetConfiguration("wMode", wmode); string strFlashVars = FC_Transform(GetConfigurationGroup("fvars"), "&{key}={value}", true); SetConfiguration("flashvars", strFlashVars); string strObjectNode = "<object " + FC_Transform(GetConfigurationGroup("object"), " {key}=\"{value}\"", true) + " >\n"; string strObjectParamsNode = FC_Transform(GetConfigurationGroup("objparams"), "\t<param name=\"{key}\" value=\"{value}\">\n", true); string strEmbedNode = "<embed " + FC_Transform(GetConfigurationGroup("embed"), " {key}=\"{value}\"", true) + " />\n"; StringBuilder htmlcodes = new StringBuilder(); htmlcodes.AppendFormat("<!-- START Code Block for Chart {0} -->" + Environment.NewLine, chartId); htmlcodes.Append(strObjectNode + Environment.NewLine); htmlcodes.Append(strObjectParamsNode + Environment.NewLine); htmlcodes.Append(strEmbedNode + Environment.NewLine); htmlcodes.AppendFormat("</object>\n<!-- END Code Block for Chart {0} -->" + Environment.NewLine, chartId); // Re-Initializing... __fc__initialize__(); return htmlcodes.ToString(); } Should I place the fallbackJSChartWhenNoFlash inside one of these functions? thanks. -
Fusioncharts._Fallbackjschartwhennoflash() Not Working As Expected
pdaniel posted a topic in Javascript Problems
We are trying to implement the FusionCharts._fallbackJSChartWhenNoFlash(); function to run javascript charts within any browser when flash is not available with version 3.2. We wrapped the FusionCharts.cs file to build our own assembly to stick into the GAC. So, I thought I would add the fallbackJSChartWhenNoFlash call inside the below function just above the call to instantiate the new chart ( new FusionCharts...). I have the highcharts.js and your jquery.min.js files inside the same directory as the FusionCharts.js file. In our case they are in a subdirectory off the main application root. I removed flash from my laptop to test. I cleared my cache, history, etc. from the browser. When I run the code, I get the image in place of the charts that states I'm missing a plugin. I read on another post to try to change the reference of the loadScript(baseURL+'highcharts.js') inside the FusionCharts.js file since my .js is in a subdirectory, but that did not work either. Any suggestions would be appreciated! Thanks. Patrick private static string RenderChartALL(string chartSWF, string dataUrl, string dataStr, string chartId, string chartWidth, string chartHeight, bool debugMode, bool registerWithJS, bool allowTransparent, string bgColor, string scaleMode, string language) { __INIT(); // string dataprovider_js_code; SetConfiguration("debugMode", boolToNum(debugMode)); SetConfiguration("registerWithJS", boolToNum(true)); // setup debug mode js parameter int debugMode_js_param = boolToNum(debugMode); // setup register with js js parameter int registerWithJS_js_param = boolToNum(true); string dataFormat = GetConfiguration("dataFormat"); dataFormat = (dataFormat == "" ? "xml" + (dataStr == "" ? "url" : "") : dataFormat + (dataStr == "" ? "url" : "")); if (GetConfiguration("renderAt") == "") SetConfiguration("renderAt", chartId + "Div"); string wmode = GetConfiguration("wMode"); if (wmode.Trim() == "" || wmode == null) { wmode = allowTransparent ? "transparent" : "opaque"; } SetConfiguration("swfUrl", chartSWF); SetConfiguration("dataFormat", dataFormat); SetConfiguration("id", chartId); SetConfiguration("width", chartWidth); SetConfiguration("height", chartHeight); SetConfiguration("wMode", wmode); string dataSource = (dataStr == "" ? dataUrl : dataStr.Replace("\n\r", "")); string dataSourceJSON = "\"dataSource\" : " + (dataFormat == "json" ? dataSource : "\"" + dataSource + "\""); string chartConfigJSON = "{" + fc_encodeJSON(GetConfigurationGroup("params"), false) + "," + dataSourceJSON + "}"; StringBuilder builder = new StringBuilder(); builder.AppendFormat("<!-- START Script Block for Chart {0} -->" + Environment.NewLine, chartId); builder.AppendFormat("<div id='{0}Div' >" + Environment.NewLine, chartId); builder.Append("Chart." + Environment.NewLine); builder.Append("</div>" + Environment.NewLine); builder.Append("<script type=\"text/javascript\">" + Environment.NewLine); builder.Append("FusionCharts._fallbackJSChartWhenNoFlash();" + Environment.NewLine); builder.AppendFormat("var chart_{0} = new FusionCharts({1}).render();", chartId, chartConfigJSON); builder.Append("</script>" + Environment.NewLine); builder.AppendFormat("<!-- END Script Block for Chart {0} -->" + Environment.NewLine, chartId); // Re-Initializing... __fc__initialize__(); return builder.ToString(); } -
Disable Slicing and Exploding Menu Options..
pdaniel replied to pdaniel's topic in FusionCharts and ASP.NET
Thanks. This worked great! The only item I need to find now is disabling the exploding pie slices. The default behavior appears to allow to explode the pie slices. I'm sure there is a property I just need to set. Thanks again! -
Disable Slicing and Exploding Menu Options..
pdaniel replied to pdaniel's topic in FusionCharts and ASP.NET
I use the RenderChart function to generate it. Hence, I'm not sure what you mean by "You might need to edit the wrappers to put the HTML embedding code for renderChartHTML or createChartHTML functions." to hide the menu. See my code below.. chartDisplay.Text = FusionCharts.RenderChart(url, "", ConvertDataSetIntoXML, ChartID, ChartWidth.ToString, ChartHeight.ToString, False, False, True) -
When users right click on the pie chart (after it has been rendered on the page), the context menu has options to slice or explode the slices. Can this be removed similar to how I can rmeove the Fusion Charts options by using showFCMenuItem='0'? I have read conflicting messages on this. Most state that it cannot be done, while one stated that it could be done with menu='0' or something along those lines. I tried to implement to no avail. I want to be able to have the flash on the chart (for the various rendering effects), but not the ability for users to perform the exploding, etc.. Thanks! Patrick
-
That was it.. I adjusted to include the namespace and it pulls it in correctly. Thanks again!
-
Thanks for the code samples! I tried to replicate that in my environment. I have a resources directory in my project that contains all the .swf files. My project name is ChartControl. Hence I plugged in the below code. Code url = Page.ClientScript.GetWebResourceUrl(Me.[GetType](), "ChartControl.resources.Pie2D.swf") AssemblyInfo.vb Page This does not work. The namespace to my project is "CFN.Web.UI.Controls.ChartControl" so I'm not sure if that changes anything.
-
Thanks for the reply. I'm not sure if I understand your question. When I execute the code in my snippet, no chart is rendered. There is no error, but there is no chart either.
-
I have created a class library assembly to be a wrapper to the Fusion files. I have added the .swf files as embedded resources in the project and I'm trying to reference these for use in the RenderChart funciton. See my code snippet below. url = Page.ClientScript.GetWebResourceUrl(GetType(ChartControl), "CFN.Web.UI.Controls.ChartControl.Pie2D.swf") chartDisplay.Text = FusionCharts.RenderChart(url, "", ConvertDataSetIntoXML, "CFNChart", ChartWidth.ToString, ChartHeight.ToString, False, False) The url converts to /Applications/APP360/WebResource.axd?d=YLFeAETZsBmqQEgBXxjSQFSxN5RnEZuFIJUEjNSceEbGk51IWHsbVz7EgPQDJcnFR4jON4zz6vCwI8vRg-0G5GLxH2CV3gfVD40OnqDPWG81&t=633528315360254502". Is this possible to accomplish? If not, how can I reference the .swf files so that they are located in only 1 directory and referenced by my class library project. Thanks! Patrick