SideAll bar/column charts crash if > 6 series or > 17 points
Posted: Tue Feb 21, 2017 9:16 pm
Bar or MultiBars charts when turned to a Style of SideAll cannot handle more than:
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.
- Six series
- Seventeen Points
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());
}
}
}
}
}