Sign in to follow this  
kalechristos

Chart Not Displayed

Recommended Posts

Dear All

I was using older version of fusion chart in ASP.Net project and I would like to upgrade to XT. I downloaded the trial version of fusion chart XT and included in my project and kept in in folder named "FusionCharts". This folder contains all files like

 

    Maps- Folder
    thems- Folder
    fusioncharts.charts.js
    fusioncharts.gantt.js
    fusioncharts.js
    fusioncharts.maps.js
    fusioncharts.powercharts.js
    fusioncharts.treemap.js
    fusioncharts.widgets.js
    fusioncharts.zoomscatter.js

the previous .swf files are not present in the fusion chart folder any more and included the script file in my page as

     <script src="FusionMaps/FusionMaps.js" type="text/javascript"></script>
    <script src="FusionCharts/FusionCharts.js" type="text/javascript"></script>
    <script src="FusionWidgets/FusionCharts.js" type="text/javascript"></script>

 

and used the following code ins C#

 

private void ResultsbyProvince()
    {
        IList result = _presenter.GetTestResultByProvince(Convert.ToInt32(rdlYear.SelectedValue));
        StringBuilder xmlData = new StringBuilder();
        StringBuilder xmlCatagory = new StringBuilder();
        StringBuilder xmlSeriesone = new StringBuilder();
        StringBuilder xmlSeriestwo = new StringBuilder();
        StringBuilder xmlSeriesthree = new StringBuilder();
        //StringBuilder xmlSeriesfour = new StringBuilder();
        xmlData.Append("<chart caption='VL Status By Region' xAxisName='Regions' yAxisName='Number of Tests' plotFillAlpha='80'" +
            //"paletteColors =' #0075c2,#1aaf5d'," +
         "baseFontColor= '#333333'" +
         "baseFont= 'Helvetica Neue,Arial'" +
         "captionFontSize= '14'" +
         "subcaptionFontSize= '14'" +
         "subcaptionFontBold= '0'" +
         "showBorder= '1'" +
         "bgColor= '#ffffff'" +
         "showShadow= '0'" +
            //"canvasBgColor= '#ffffff', " +
         "canvasBorderAlpha= '0'" +
         "divlineAlpha= '100'" +
         "divlineColor= '#999999'" +
         "divlineThickness= '1'" +
         "divLineDashed= '1'" +
         "divLineDashLen= '1'" +
         "divLineGapLen= '1'" +
         "plotGradientColor=''" +
         "usePlotGradientColor= '0'" +
         "showplotborder= '0'" +
         "valueFontColor= '#ffffff'" +
         "placeValuesInside= '1'" +
         "showHoverEffect= '1'" +
         "rotateValues= '1'" +
         "xAxisLineThickness= '100'" +
         "xAxisLineColor= '#999999'" +
          "xAxisLineThickness= '2'" +
          "interactivelegend='1'"+
         "showAlternateHGridColor= '0'" +
         "plothighlighteffect='fadeout'"+
            ////" legendBgAlpha= '0'," +
            // "legendBorderAlpha= '0," +
            //// "legendShadow= '0'," +
            //// "legendItemFontSize= '10'," +
         "legendItemFontColor= '#666666'>");
        xmlCatagory.Append("<categories>");
        xmlSeriesone.Append("<dataset seriesName='Detected' color='FF0040'>");
        xmlSeriestwo.Append("<dataset seriesName='Not Detected' color='0000FF'>");
        xmlSeriesthree.Append("<dataset seriesName='Rejected' color='00ff7f'>");
        //xmlSeriesfour.Append("<dataset seriesName='Rejected' color='F5F75A'>");

        //Iterate through the data    
        foreach (object[] pr in result)
        {

            xmlCatagory.AppendFormat("<category name='{0}'/>", pr[0]);
            xmlSeriesone.AppendFormat("<set value='{0}' label='Detected'/>", pr[1]);
            xmlSeriestwo.AppendFormat("<set value='{0}' label='Not Detected' />", pr[2]);
            xmlSeriesthree.AppendFormat("<set value='{0}'label='Rejected' />", pr[3]);
           //xmlSeriesfour.AppendFormat("<set value='{0}' label='Rejected'/>", pr[4]);



        }
        //Close <categories> element

        xmlCatagory.Append("</categories>");

        //Close <dataset> elements
        xmlSeriesone.Append("</dataset>");
       xmlSeriestwo.Append("</dataset>");
       xmlSeriesthree.Append("</dataset>");
       //xmlSeriesfour.Append("</dataset>");

        xmlData.Append(xmlCatagory.ToString());
        xmlData.Append(xmlSeriesone.ToString());
       xmlData.Append(xmlSeriestwo.ToString());
       xmlData.Append(xmlSeriesthree.ToString());
      // xmlData.Append(xmlSeriesfour.ToString());
        xmlData.Append("</chart>");

        ltrreultbyprovission.Text = FusionCharts.RenderChart("FusionCharts/MSColumn2D", "", xmlData.ToString(), "ResultsbyProvince", "600", "350", false, true);
        
    }

 

with there is no chart to displayed at all. can any body help me in this

 

Share this post


Link to post
Share on other sites

Hi

 

SWF files were used with flash version of FusionCharts, now charts are rendered using pure JavaScript only. Also, the .NET wrapper has also been updated which can be downloaded using this link: http://www.fusioncharts.com/asp-net-charts/

 

To know more about creating charts using ASP.NET wrapper, please refer to this developer documentation link: http://www.fusioncharts.com/dev/using-with-server-side-languages/asp-net/introduction.html

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this