Page 1 of 1

"Invalid Parameter" error when clicking a series

Posted: Fri Feb 20, 2004 8:23 am
by 6931136
Hi, I have a problem getting the event handlers to work in my ASP.NET application. If I just add a chart to my page, add a series with some random values and add the event handler for click_series (and set the AutoPostBack to true). When I click the series, I get the follogwing error:

Code: Select all

[ArgumentException: Invalid parameter used.]
   System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
   System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
   Steema.TeeChart.Chart.Bitmap(Int32 width, Int32 height, PixelFormat pixelformat)
   Steema.TeeChart.Chart.Bitmap(Int32 width, Int32 height)
   Steema.TeeChart.Web.WebChart.CreatePictureFile(HtmlTextWriter writer)
   Steema.TeeChart.Web.WebChart.Render(HtmlTextWriter output)
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   System.Web.UI.Control.Render(HtmlTextWriter writer)
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   System.Web.UI.Page.ProcessRequestMain()

What is the problem?

Regards
/Jakob

Posted: Fri Feb 20, 2004 10:36 am
by Pep
Hi Jakob,

have you studied the example included in the TeeChart for Net v1 installation under :
C:\Program Files\Steema Software\TeeChart for .NET v1\TeeChartForNET\WebFormVB
which make use of these events ?
Does it works fine for you ?

Posted: Wed Feb 25, 2004 6:35 pm
by 8123134
The reason for this error is that I don't explicitly set the Height property in the designer!

If I set the Height property programmatically I get the error (and the chart does not become the size that I set it to be??)

Regards
/Jakob

Posted: Thu Feb 26, 2004 9:49 am
by Pep
Hi Jakob,

are you using something like the following to set the Width and Height ?

WebChart1.Width() = Unit.Pixel(700)