MVC 4 Razor

Mar 20, 2014 at 9:55 AM
Is the chart working with MVC 4 Razor? The chart is not rendered when I am trying to use it.

the js code is rendered as text
<div id="_lib_DIV_Chart01" align="center"></div> <script type="text/javascript"> var Chart01 = (function() { return { containerId: '_lib_DIV_Chart01', xmlData: '', chartType: '', showChart: function() { var chartURL = '/Content/FusionChartsSWF/' + 'FCF_' + this.chartType.replace('Chart', '.swf'); var _lib_JS_Chart01 = new FusionCharts(chartURL, "_lib_OBJ_Chart01", "600", "400"); _lib_JS_Chart01.setDataXML(this.xmlData); _lib_JS_Chart01.render("_lib_DIV_Chart01"); } } })(); setTimeout(function(){ Chart01.xmlData = "<?xml version='1.0' encoding='utf-16'?><graph baseFont='Verdana' bgAlpha='50' bgColor='ffffff' caption='Top seller (%)' subCaption='November'><set Name='Alan' Value='9' Color='95B3D7' ShowName='1' /><set Name='Tom' Value='15' Color='D99795' ShowName='1' /><set Name='Tete' Value='25' Color='C2D69A' ShowName='1' /><set Name='Ana' Value='51' Color='948B54' ShowName='1' /></graph>"; Chart01.chartType = "Pie2DChart"; Chart01.showChart(); },0); </script>