Page 1 of 1

System.IndexOutOfRangeException by show a HighLow Serie

Posted: Thu Mar 02, 2006 9:57 am
by 8120407
Hi,

We get a System.IndexOutOfRangeException when we want to show a hidden highLow serie. The Teechart is used in a ASP.net 2003 application.
The chart is created with the highLow series hidden. Then we cache the chart so we have it after a postback.

In the event of a checkbox we switch the serie on or off. (value checkbox).

When we do this in code by generate the chart there is no problem (we can hide and show, but when we do this in like so :

Code: Select all

// something goes here wrong !!! indexout of bound exeption
private void minMaxValue_CheckedChanged(object sender, System.EventArgs e)
        {
            try
            {
            
                bool minMaxChecked =  minMaxValue.Checked;
        
                foreach(DictionaryEntry lineDescEntry in WebChartSerieLineDesc)
                {
                    string lineDesc = lineDescEntry.Value.ToString().ToLower();
                    int serieNr = int.Parse(lineDescEntry.Key.ToString());

                    if ((lineDesc  == "min") || (lineDesc== "max"))
                    {
                        if(GraphDetail.Chart.Series[serieNr].Visible != minMaxChecked)
                        {   
                            GraphDetail.Chart.Series[serieNr].Visible  = minMaxChecked;
                    
                        }
                    }
                    else
                    {
                        if(lineDesc == "min/max")
                        {
                           // HighLow series
                           Steema.TeeChart.Styles.HighLow highLowStyle = (Steema.TeeChart.Styles.HighLow)GraphDetail.Chart.Series[serieNr];
                           highLowStyle.Visible =   minMaxChecked; 
                        }
                    }
                }
            }
            catch (Exception error)
            {
                HDBPageHeaderSubPlus.ErrorMessage = error.Message;
                General.Log.Write(error,"minMaxValue_CheckedChanged",pageName);
            }
        }
    }
It thows the following exception after exiting the event.

Global.asax.Application_Error: Error: System.Web.HttpUnhandledException: Er is een uitzondering van het type System.Web.HttpUnhandledException veroorzaakt. ---> System.IndexOutOfRangeException: De index ligt buiten de matrixgrenzen.
at Steema.TeeChart.Styles.ValueList.get_Item(Int32 index)
at Steema.TeeChart.Styles.HighLow.DrawValue(Int32 valueIndex)
at Steema.TeeChart.Styles.Series.Draw()
at Steema.TeeChart.Styles.Series.DrawSeries()
at Steema.TeeChart.Chart.InternalDraw(Graphics g)
at Steema.TeeChart.Chart.Draw(Graphics g, Rectangle r)
at Steema.TeeChart.Chart.Draw(Graphics g)
at Steema.TeeChart.Chart.Bitmap(Int32 width, Int32 height, PixelFormat pixelformat)
at Steema.TeeChart.Chart.Bitmap(Int32 width, Int32 height)
at Steema.TeeChart.Export.ImageExportFormat.Save(Stream stream)
at Steema.TeeChart.Web.WebChart.CreatePictureFile(HtmlTextWriter writer)
at Steema.TeeChart.Web.WebChart.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain()
--- Einde van intern uitzonderingsstackpad ---
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

We tried several things but without succes is this a bug in the TeeChart object !!!

Version TeeChart :
Release Notes June 2005
TeeChart.NET Version 1
Build 1.1.2004.16592

Thanks,
Roland Hillebrand

Posted: Thu Mar 02, 2006 11:30 am
by narcis
Hi Roland,

Could you please send us an example we can run "as-is" to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.

Posted: Thu Mar 02, 2006 12:41 pm
by 8120407
Hi,

A test application is posted to the requested news group.

Thanks,

With regards,

Roland Hillebrand

Posted: Thu Mar 02, 2006 2:49 pm
by narcis
Hi Roland,

Thank you very much for the example. It works fine for me here using TeeChart for .NET v2 latest Debug build available at our Customer Download Area. Which TeeChart version are you using?

I enabled and disabled all checkboxes in the WebForm. Are there any special steps I should follow to reproduce the problem?

Thanks in advance.

Posted: Thu Mar 02, 2006 2:59 pm
by 8120407
Hi.

Version TeeChart :
Release Notes June 2005
TeeChart.NET Version 1
Build 1.1.2004.16592

The problem accurs if je first uncheck series 3, and then check again series 3 (make serie 3 visible).

With regards,

Roland Hillebrand

Posted: Fri Mar 03, 2006 10:31 am
by 8120407
Hi,

Can we without a problem switch to V2 from Teechart
(also licenses).

With regards,

Roland Hillebrand

Posted: Fri Mar 03, 2006 11:37 am
by narcis
Hi Roland,
Version TeeChart :
Release Notes June 2005
TeeChart.NET Version 1
Build 1.1.2004.16592

The problem accurs if je first uncheck series 3, and then check again series 3 (make serie 3 visible).
Sorry for not having noticed before. We have been able to reproduce the problem and fixed it for the next TeeChart for .NET v1 maintenance release.
Can we without a problem switch to V2 from Teechart
(also licenses).
Yes, you won't have any problem upgrading from v1 to v2. You can do it on-line here. For further information please contact our Sales Dept. at sales@steema.com.

Posted: Fri Mar 03, 2006 12:00 pm
by 8120407
Hi,

Thanks for the fast support,

Do you know when this will be released.

With regards,

Roland Hillebrand

Posted: Fri Mar 03, 2006 12:16 pm
by narcis
You're welcome Roland,

There are a few items we are still pending of but we expect a new maintenance release to be ready before the end of next week. Please be aware at this forum for further news.

Posted: Tue Mar 14, 2006 1:47 pm
by 8120407
Narcis,
narcis wrote:You're welcome Roland,

There are a few items we are still pending of but we expect a new maintenance release to be ready before the end of next week. Please be aware at this forum for further news.
When can we expect the release

With regards,

Roland Hillebrand

Posted: Tue Mar 14, 2006 2:28 pm
by narcis
Hi Roland,

The maintenance release is already available since last Thursday. We forgot to announce it in the forums. However we are going to do that immediately.