Austin Davidson Report post Posted December 14, 2011 Hi, I have just started creating a dashboard using FusionCharts. The first charts that I coded (Widget Angular Gauges) worked fine, but when I moved onto my first MS Line chart, I ran into a problem that I can't seem to resolve. Basically, the problem is that the chart object loads fine, says "retrieving data" for a second and then always ends up saying "no data to display". The XML data that I am passing in is pulled directly from one of your gallery examples, so I don't understand why it won't render. Here's my setup: kpi-dashboard/default.aspx: ... <div class="chartContainer-655-405"> <div class="chartObject-655-405"> <asp:Literal ID="ltlCustomerLevels" runat="server"></asp:Literal> </div> </div> ... kpi-dashboard/default.aspx.cs ... String dataURLCustomerLevels = Server.UrlEncode("/apps/kiwi/kpi-dashboard/datafeed/customer-levels.aspx?animate=1"); ltlCustomerLevels.Text = FusionCharts.RenderChart("/apps/kiwi/fusioncharts/MSLine.swf", dataURLCustomerLevels, "", "CustomerLevels", "605", "385", false, false, true); ... kpi-dashboard/datafeed/customer-levels.aspx.cs protected void Page_Load(object sender, EventArgs e) { //xmlData will be used to store the entire XML document generated StringBuilder xmlData = new StringBuilder(); //Default.aspx has passed us a property animate. We request that. string animateChart; animateChart = Request["animate"]; //Set default value of 1 if (animateChart != null && animateChart.Length == 0) { animateChart = "1"; } xmlData.Append("<chart caption=' ' subCaption=' ' numdivlines='9' lineThickness='2' showValues='0' numVDivLines='11' formatNumberScale='1' labelDisplay='ROTATE' slantLabels='1' anchorRadius='2' anchorBgAlpha='50' showAlternateVGridColor='1' anchorAlpha='100' animation='1' limitsDecimalPrecision='0' divLineDecimalPrecision='1'>"); xmlData.Append("<categories >"); xmlData.Append("<category label='2011-01-01' />"); xmlData.Append("<category label='2011-02-01' />"); xmlData.Append("<category label='2011-03-01' />"); xmlData.Append("<category label='2011-04-01' />"); xmlData.Append("<category label='2011-05-01' />"); xmlData.Append("<category label='2011-06-01' />"); xmlData.Append("<category label='2011-07-01' />"); xmlData.Append("<category label='2011-08-01' />"); xmlData.Append("<category label='2011-09-01' />"); xmlData.Append("<category label='2011-10-01' />"); xmlData.Append("<category label='2011-11-01' />"); xmlData.Append("<category label='2011-12-01' />"); xmlData.Append("</categories>"); xmlData.Append("<dataset seriesName='Customers' color='0080C0' anchorBorderColor='0080C0' >"); xmlData.Append("<set value='633' />"); xmlData.Append("<set value='904' />"); xmlData.Append("<set value='1215' />"); xmlData.Append("<set value='1358' />"); xmlData.Append("<set value='1482' />"); xmlData.Append("<set value='1666' />"); xmlData.Append("<set value='1811' />"); xmlData.Append("<set value='2051' />"); xmlData.Append("<set value='2138' />"); xmlData.Append("<set value='2209' />"); xmlData.Append("<set value='2247' />"); xmlData.Append("<set value='2301' />"); xmlData.Append("</dataset>"); xmlData.Append("<dataset seriesName='Services' color='800080' anchorBorderColor='800080'>"); xmlData.Append("<set value='2886' />"); xmlData.Append("<set value='3252' />"); xmlData.Append("<set value='3673' />"); xmlData.Append("<set value='4026' />"); xmlData.Append("<set value='4470' />"); xmlData.Append("<set value='4813' />"); xmlData.Append("<set value='4961' />"); xmlData.Append("<set value='5086' />"); xmlData.Append("<set value='5284' />"); xmlData.Append("<set value='5391' />"); xmlData.Append("<set value='5657' />"); xmlData.Append("<set value='5847' />"); xmlData.Append("</dataset>"); xmlData.Append("<dataset seriesName='PhoneNumbers' color='FF0080' anchorBorderColor='FF0080' >"); xmlData.Append("<set value='1112' />"); xmlData.Append("<set value='1192' />"); xmlData.Append("<set value='1219' />"); xmlData.Append("<set value='2264' />"); xmlData.Append("<set value='2282' />"); xmlData.Append("<set value='2365' />"); xmlData.Append("<set value='2433' />"); xmlData.Append("<set value='2559' />"); xmlData.Append("<set value='2823' />"); xmlData.Append("<set value='2867' />"); xmlData.Append("<set value='2867' />"); xmlData.Append("<set value='2867' />"); xmlData.Append("</dataset>"); xmlData.Append("</chart>"); //Set proper output content-type Response.ContentType = "text/xml"; //Write out the XML data Response.Write(xmlData.ToString()); What am I doing wrong?? Share this post Link to post Share on other sites
Austin Davidson Report post Posted December 14, 2011 PS - here is the output when I run it in debug mode: Info: Chart loaded and initialized. Initial Width: 605 Initial Height: 385 Scale Mode: noScale Debug Mode: Yes Application Message Language: EN Version: 3.1.1 Chart Type: Multi Series 2D Line Chart Chart Objects: BACKGROUND CANVAS CAPTION SUBCAPTION YAXISNAME XAXISNAME DIVLINES VDIVLINES YAXISVALUES HGRID VGRID DATALABELS DATAVALUES TRENDLINES TRENDVALUES DATAPLOT ANCHORS TOOLTIP VLINES LEGEND VLINELABELS INFO: XML Data provided using dataURL method. dataURL provided: /apps/kiwi/kpi-dashboard/datafeed/customer-levels.aspx?animate=1 dataURL invoked: /apps/kiwi/kpi-dashboard/datafeed/customer-levels.aspx?animate=1&FCTime=746 XML Data: <chart palette="2" showValue="0" inThousandSeparator="," bgAlpha="0,0" canvasBgAlpha="0" bgColor="222222" lowerLimit="0" upperLimit="30000" numberSuffix="" showBorder="0" basefontColor="000000" chartTopMargin="0" chartBottomMargin="25" chartLeftMargin="20" chartRightMargin="25" toolTipBgColor="fafafa" gaugeFillMix="{dark-10},{light-70},{dark-10}" gaugeFillRatio="3" pivotRadius="8" gaugeInnerRadius="50%" tickValueDistance="20"><colorRange><color minValue="0" maxValue="30000" code="8BBA00" /></colorRange><dials><dial value="15800" rearExtension="10" baseWidth="10" /></dials><trendpoints><point value="14000" displayValue=" " useMarker="1" markerRadius="6" dashed="1" dashLen="2" dashGap="2" /></trendpoints><annotations><annotationGroup id="Grp1" showBelow="1"><annotation type="text" font="Arial" fontSize="18" bold="1" fontColor="2db5e5" x="140" y="10" label="30d Cancellation Count" /></annotationGroup></annotations><styles><definition><style name="trendvaluefont" type="font" bold="0" borderColor="FFFFDD" /></definition><application /></styles></chart> 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. Share this post Link to post Share on other sites
Austin Davidson Report post Posted December 14, 2011 Nevermind. I figured this out... I had copied the datafeed/customer-levels.aspx / .cs files and forgot to update the inherriting class... Share this post Link to post Share on other sites
Guest Angshu Report post Posted December 15, 2011 Hi, Welcome to FusionCharts Forum! Glad to know that you have managed to resolve your problem. Happy FusionCharting!!! Share this post Link to post Share on other sites