Jump to content
Software FX Community

With and Height in Percent


User (Legacy)

Recommended Posts

Is the chart inside a table cell ? 100% refers to what ? 100% of what ?

I suggest you try with a simple control (e.g. a button) putting in the same

place the chart is and setting Width and Height to 100%

We don't do much with the Width and Height properties, they are inherited

from Control.

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

Hmm.. guess I had higher expectations of your product than I do for 

button...

Anyway button gives me a sane default, your chart gives me nothing.

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:IXA4Niz4GHA.3268@webserver3.softwarefx.com...

> Is the chart inside a table cell ? 100% refers to what ? 100% of what ?

>

> I suggest you try with a simple control (e.g. a button) putting in the

> same place the chart is and setting Width and Height to 100%

>

> We don´t do much with the Width and Height properties, they are inherited

> from Control.

>

> --

> Francisco Padron

> www.chartfx.com

>

Link to comment
Share on other sites

Hmm ... Will a "better" calculator calculate 1 + 1 = 3 ?

The way I see it 100% of zero is zero no matter who is calculating it. The

button may have a minimum size (probably given by the browser) whereas the

chart is a "picture" and it does not have an intrinsic minimum size.

So the bottom line is what is it that you need ? You need the chart to be

how tall ? 100% of what ? If you put the chart inside a table cell that is

300 pixels tall and you set the Height to 100% then the height will be 300

pixels.

Notice that generating images using % is usually not a good idea as the

stretching done by the browser will generate weird looking images. % Sizes

make more sense for SVG, Flash or .NET client rendering.

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

  • 1 month later...

This is a very helpfull response.  I like the sarcasm, 1+1, hmm, so glad to 

be a paying customer.

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:KhDdKM04GHA.3268@webserver3.softwarefx.com...

> Hmm ... Will a "better" calculator calculate 1 + 1 = 3 ?

>

> The way I see it 100% of zero is zero no matter who is calculating it. The

> button may have a minimum size (probably given by the browser) whereas the

> chart is a "picture" and it does not have an intrinsic minimum size.

>

> So the bottom line is what is it that you need ? You need the chart to be

> how tall ? 100% of what ? If you put the chart inside a table cell that is

> 300 pixels tall and you set the Height to 100% then the height will be 300

> pixels.

>

> Notice that generating images using % is usually not a good idea as the

> stretching done by the browser will generate weird looking images. % Sizes

> make more sense for SVG, Flash or .NET client rendering.

>

> --

> Francisco Padron

> www.chartfx.com

>

Link to comment
Share on other sites

  • 3 years later...

I found out how to put the .NET charts inside a table. A table has a starting default height and width of basically 0, so the charts are also of 0 height and width. So I set the table as

<table border=""1"" style='height: 400px; width: 600px'>

And I set the charts to

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

Chart.Width = System.Web.UI.WebControls.Unit.Percentage(100)

Chart.UpdateSizeNow()

After this, the charts showed up OK.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...