Page 1 of 3

Change chart style from any style to Histogram error

Posted: Thu Aug 14, 2008 8:26 am
by 9638303
Dear Sir,

When I try to change the web chart style from any kind of style to Histogram, i get error "Index was outside the bounds of the array",
you also can download the sample project from

http://goc-sp.com/tchart/webtchart.zip
Using 2005.net to open the folder and run default.aspx as startup page.
then press the button, you will get the error as below.


Tchart version = 2.0.3033.18431 and Error msg as below

[IndexOutOfRangeException: Index was outside the bounds of the array.]
Steema.TeeChart.Styles.Series.CalcXPos(Int32 index) +43
Steema.TeeChart.Styles.Histogram.CalcRectangle(Int32 valueIndex) +214
Steema.TeeChart.Styles.Histogram.DrawValue(Int32 valueIndex) +88
Steema.TeeChart.Styles.Histogram.GetBounds(Int32 index, PolygonStyle& p) +36
Steema.TeeChart.Styles.MapRegion.GetPolygons(Series s) +376
Steema.TeeChart.Styles.MapRegion..ctor(SeriesHotspot h) +219
Steema.TeeChart.Tools.SeriesHotspot.GetMap(MarksStyles style) +47
Steema.TeeChart.Tools.SeriesHotspot.GenerateMap() +27
Steema.TeeChart.Web.WebChart.CreatePictureFile(HtmlTextWriter writer) +2492
Steema.TeeChart.Web.WebChart.Render(HtmlTextWriter output) +30
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +234
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +98
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +43
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +336
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +56
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +234
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53
System.Web.UI.Control.Render(HtmlTextWriter writer) +31
System.Web.UI.Page.Render(HtmlTextWriter writer) +39
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5537

Eric[/url]

Re: Change chart style from any style to Histogram error

Posted: Thu Aug 14, 2008 10:23 am
by Chris
Hello,
Eric wrote: When I try to change the web chart style from any kind of style to Histogram, i get error "Index was outside the bounds of the array",
you also can download the sample project from
This seems to work fine with the lastest maintenance release, e.g.

Code: Select all

    public Form3()
    {
      InitializeComponent();
      InitializeChart();
    }

    private Steema.TeeChart.Styles.Points series;
    private Steema.TeeChart.TChart tChart1; 

    private void InitializeChart()
    {
      tChart1 = new Steema.TeeChart.TChart();
      tChart1.Dock = DockStyle.Fill;
      this.Controls.Add(tChart1);

      tChart1.Series.Add(series = new Points());
      series.FillSampleValues();

      tChart1.DoubleClick+=new EventHandler(tChart1_DoubleClick);
    }

    void tChart1_DoubleClick(object sender, EventArgs e)
    {
      Series series = tChart1[0];
      Steema.TeeChart.Styles.Series.ChangeType(ref series, typeof(Histogram));
    }

Posted: Thu Aug 14, 2008 10:45 am
by 9638303
Dear Sir,

If not winFrom Tchart. Is WebTChat.
Please download the same project and try and see

Thank & Best Regard
Eric

Posted: Thu Aug 14, 2008 11:01 am
by Chris
Hello,
Eric wrote: If not winFrom Tchart. Is WebTChat.
Please download the same project and try and see
Why don't you try running the code I sent in a webchart on a webform? It should work in exactly the same way.

Posted: Thu Aug 14, 2008 11:10 am
by 9638303
Dear Sir,

Is different, because only web will involved GetHTMLMap method
I think i put the wrong title, after checking the Exception.

Histogram error when trying to use SeriesHotspot to generate the e.PointPolygon.Attributes

Anyway, Please download the sample project to test it.

Thank & Best Regard
Eric

Posted: Thu Aug 14, 2008 11:13 am
by 9638303
Dear Sir,

Look at the Exception... confirm that histogram got error on CalcXPos methods.

Steema.TeeChart.Styles.Series.CalcXPos(Int32 index) +43
Steema.TeeChart.Styles.Histogram.CalcRectangle(Int32 valueIndex) +214
Steema.TeeChart.Styles.Histogram.DrawValue(Int32 valueIndex) +88
Steema.TeeChart.Styles.Histogram.GetBounds(Int32 index, PolygonStyle& p) +36
Steema.TeeChart.Styles.MapRegion.GetPolygons(Series s) +376
Steema.TeeChart.Styles.MapRegion..ctor(SeriesHotspot h) +219
Steema.TeeChart.Tools.SeriesHotspot.GetMap(MarksStyles style) +47
Steema.TeeChart.Tools.SeriesHotspot.GenerateMap() +27

Thank & Best Regard
Eric

Posted: Thu Aug 14, 2008 1:42 pm
by Chris
Hello,
Eric wrote:Is different, because only web will involved GetHTMLMap method I think i put the wrong title, after checking the Exception.
I see. I'm sorry, I think the title of this thread put me on the wrong track.
Eric wrote:Histogram error when trying to use SeriesHotspot to generate the e.PointPolygon.Attributes
That would have been better :)

Anyhow, I've been able to reproduce the problem and have added it to our tracking database with reference TF02013326. This defect has already been fixed for the next maintenance release due out next month.

Posted: Fri Aug 15, 2008 1:56 am
by 9638303
Dear Sir,

Oh, good to heard that problem has been solved.
Anyway, do you mind to send me the update dll as soon as possible?
Because we're running the demo in my customer server now, we worry this error ocurs at when they choose this chart style


Thank & Best Regard
Eric

Posted: Mon Aug 18, 2008 8:35 am
by Pep
Hello Eric,

ok, we'll try to send to you the an updated dll as soon as possible.

Posted: Mon Aug 18, 2008 9:01 am
by 9638303
Dear Sir,

Thank you very much

Eric

Posted: Wed Aug 20, 2008 4:02 am
by 9638303
Dear Sir,

Do the latest dll avaiable for me to download? I need it as soon as possible. because I just received the bug report from our customer regarding this issues. we hope can can solve it as soon as possible.

Eric

Posted: Wed Aug 20, 2008 11:44 am
by Pep
Hello Eric,

the person who prepares the maintenance releases is on vacation period. But if you let me know which VS.NET version are you using I can prepare the dll and send it to you directly through mail.

Posted: Thu Aug 21, 2008 1:47 am
by 9638303
Dear Sir,

OK. I'm using 2005 VS.net. Please send me the dll as soon as possible.

Thank & Best regard
Eric

Posted: Thu Aug 21, 2008 9:28 am
by Pep
Hi Eric,

sent !.

Posted: Fri Aug 22, 2008 7:50 am
by 9638303
Dear Sir,

Thank and received, but we still occurs the same error
[Histogram error when trying to use SeriesHotspot to generate the e.PointPolygon.Attributes ] on this version (2.0.2964.31902)

Do this bug has been solved?

Eric