Jump to content
Software FX Community

.NET RenderFormat problem with height set as percentage


dekj

Recommended Posts

When I create more than two charts on a webpage with RenderFormat set to .NET, and I set the height of all the charts at, say, 50% of the screen height, the 3rd, 4th, and on charts all have larger heights, starting with twice as high as chart #2 and growing larger after that. Any ideas? I find when I restore/maximize the IE, or just change the size of a restored IE, the charts reset correctly.

 The codebehind I use for this is

 Chart.Height = System.Web.UI.WebControls.Unit.Percentage(50)

 

Link to comment
Share on other sites

I found an answer to this. I added this javascript in the header, to be executed onLoad.

var myChartLast;

myChartLast = document.getElementById("chart14");

myChartLast.style.height = 200;

myChartLast.style.height = '';

After this, the charts all had the correct size.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...