Change chart style from any style to Histogram error

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Eric
Newbie
Newbie
Posts: 99
Joined: Wed Sep 14, 2005 4:00 am

Change chart style from any style to Histogram error

Post by Eric » Thu Aug 14, 2008 8:26 am

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]

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Re: Change chart style from any style to Histogram error

Post by Christopher » Thu Aug 14, 2008 10:23 am

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));
    }
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Eric
Newbie
Newbie
Posts: 99
Joined: Wed Sep 14, 2005 4:00 am

Post by Eric » Thu Aug 14, 2008 10:45 am

Dear Sir,

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

Thank & Best Regard
Eric

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Thu Aug 14, 2008 11:01 am

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.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Eric
Newbie
Newbie
Posts: 99
Joined: Wed Sep 14, 2005 4:00 am

Post by Eric » Thu Aug 14, 2008 11:10 am

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

Eric
Newbie
Newbie
Posts: 99
Joined: Wed Sep 14, 2005 4:00 am

Post by Eric » Thu Aug 14, 2008 11:13 am

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

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Thu Aug 14, 2008 1:42 pm

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.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Eric
Newbie
Newbie
Posts: 99
Joined: Wed Sep 14, 2005 4:00 am

Post by Eric » Fri Aug 15, 2008 1:56 am

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

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Aug 18, 2008 8:35 am

Hello Eric,

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

Eric
Newbie
Newbie
Posts: 99
Joined: Wed Sep 14, 2005 4:00 am

Post by Eric » Mon Aug 18, 2008 9:01 am

Dear Sir,

Thank you very much

Eric

Eric
Newbie
Newbie
Posts: 99
Joined: Wed Sep 14, 2005 4:00 am

Post by Eric » Wed Aug 20, 2008 4:02 am

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

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Aug 20, 2008 11:44 am

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.

Eric
Newbie
Newbie
Posts: 99
Joined: Wed Sep 14, 2005 4:00 am

Post by Eric » Thu Aug 21, 2008 1:47 am

Dear Sir,

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

Thank & Best regard
Eric

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Aug 21, 2008 9:28 am

Hi Eric,

sent !.

Eric
Newbie
Newbie
Posts: 99
Joined: Wed Sep 14, 2005 4:00 am

Post by Eric » Fri Aug 22, 2008 7:50 am

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

Post Reply