SideAll bar/column charts crash if > 6 series or > 17 points

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
biqpaulson
Newbie
Newbie
Posts: 93
Joined: Thu Apr 17, 2008 12:00 am

SideAll bar/column charts crash if > 6 series or > 17 points

Post by biqpaulson » Tue Feb 21, 2017 9:16 pm

Bar or MultiBars charts when turned to a Style of SideAll cannot handle more than:
  • Six series
  • Seventeen Points
Without getting an "System.IndexOutOfRangeException".

For the example below the chart is fine until you either uncomment the "CRASH_ON_TOO_MANY_SERIES"" or "CRASH_ON_TOO_MANY_POINTS" defines.

Code: Select all

//#define CRASH_ON_TOO_MANY_SERIES
//#define CRASH_ON_TOO_MANY_POINTS
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Steema.TeeChart;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = true;
#if (CRASH_ON_TOO_MANY_SERIES)
            for (int i=0; i < 7; i++)
#else
            for (int i=0; i < 6; i++)
#endif
            {
                Steema.TeeChart.Styles.Bar TheSeries = new Steema.TeeChart.Styles.Bar();
                TheSeries.MultiBar = Steema.TeeChart.Styles.MultiBars.SideAll;
                TheSeries.Title = "Series-" + i.ToString();
                TheSeries.Marks.Visible = false;

                tChart1.Series.Add(TheSeries);

#if (CRASH_ON_TOO_MANY_POINTS)
                for (int j = 10; j < 180; j += 10)
#else
                for (int j = 10; j < 170; j += 10)
#endif
                {
                    TheSeries.Add(j, "Label-" + j.ToString());
                }
            }
        }
    }
}

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: SideAll bar/column charts crash if > 6 series or > 17 points

Post by Christopher » Wed Feb 22, 2017 3:50 pm

Hello,

Thank you for the concise and accurate issue reporting - this has now been added to our issue tracker with id=1797.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply