Sign in to follow this  
pickle

Chart not displaying

Recommended Posts

Hello,

 

I'm having trouble figuring out why my chart is not displaying anything. Here is the code to set up the literal placeholder inside of the page:

 

            <div style="width:350px;margin-left:auto;margin-right:auto;height:200px;padding-top:10px;" id="statusChartDiv">
                 <div id="statusChartContainer"></div>
                 <asp:Literal ID="Literal3" Visible="true" runat="server"></asp:Literal>
            </div>

 

And here is the code in the code-behind file that actually does the rendering:

 

            StringBuilder xmlData = new StringBuilder();

            xmlData.Append("<chart caption='Status Of Period' numberSuffix='%'>");
            xmlData.AppendFormat("<set label='Period Elapsed' value='4'/>");//temp1.ToString());
            xmlData.AppendFormat("<set label='Total Expensed' value='5'/>");//temp2.ToString());
            xmlData.AppendFormat("<set label='Hours Delivered' value='6'/>");//temp3.ToString());
            xmlData.Append("</chart>");

            Literal3.Text = FusionCharts.RenderChart("/Dashboard/Charts/Bar2D.swf", "", xmlData.ToString(), "statusID", "100%", "100%", false, false);

 

A couple pointers:

*I know the file path for the FusionCharts.js file (and other related files) is correct because I have other FusionCharts on the same page that are being rendered perfectly, however, this chart does not display anything.

*I have tested the <div> elements (which are consistent throughout the page) and they are in the correct places so if anything were to show up I would be able to tell.

*Also, the code in the code-behind file is located within a function that is called inside of the page_load function, which is set up much like the other chart functions that are not having problems.

 

Any noticeable mistakes I am missing?

 

Thanks,

 

pickle

Share this post


Link to post
Share on other sites

[sOLVED]

 

I figured out that it was not rendering due to setting the chart's height/width properties as percentages. When they were set to percentages it would only work in IE10. I then changed them to be represented in pixels and it now works in Firefox 22. This problem occurred with the Pie2d and Bar2d charts just to let you guys know.

 

Thanks,

 

pickle

Edited by pickle

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi Pickle,

 

Welcome to FusionCharts Forum!

 

You can not mark this post as solved or closed. Well, don't mind this can be helpful for everyone.  :)

 

Also, what FusionCharts version did you use?

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