Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2012

Summary: fix to id=1451 broke ColorEach functionality in Polar series
Product: .NET TeeChart Reporter: christopher ireland <chris>
Component: SeriesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: regression    
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://www.teechart.net/support/viewtopic.php?f=4&t=16845
Chart Series: Polar Delphi / C++ Builder RAD IDE Version:

Description christopher ireland 2018-03-08 05:56:51 EST
Code to reproduce:

		private void Form1_Load(object sender, EventArgs e)
		{
			Steema.TeeChart.Styles.Polar serie = new Steema.TeeChart.Styles.Polar();

			serie.Add(0, 50, "tag1", Color.Red);
			serie.Add(90, 75, "tag2", Color.Blue);
			serie.Add(180, 25, "tag3", Color.Green);
			serie.Add(270, 35, "tag4", Color.HotPink);

			serie.Brush.Color = System.Drawing.Color.Red;
			serie.Brush.Visible = false;
			serie.Circled = true;
			serie.ColorEach = true;
			tChart1.Axes[0].Automatic = false;
			tChart1.Axes[0].Minimum = 0;
			tChart1.Axes[0].Maximum = 100;

			tChart1.Series.Add(serie);
		}
Comment 1 christopher ireland 2018-03-08 06:10:40 EST
This has now been fixed. The workaround is to use the GetPointerStyle event, e.g.

		List<Color> colors = new List<Color>();

		private void Form1_Load(object sender, EventArgs e)
		{
			Steema.TeeChart.Styles.Polar serie = new Steema.TeeChart.Styles.Polar();

			colors.Add(Color.Red);
			colors.Add(Color.Blue);
			colors.Add(Color.Green);
			colors.Add(Color.HotPink);

			serie.Add(0, 50, "tag1", colors[0]);
			serie.Add(90, 75, "tag2", colors[1]);
			serie.Add(180, 25, "tag3", colors[2]);
			serie.Add(270, 35, "tag4", colors[3]);

			serie.Brush.Color = System.Drawing.Color.Red;
			serie.Brush.Visible = false;
			serie.Circled = true;
			tChart1.Axes[0].Automatic = false;
			tChart1.Axes[0].Minimum = 0;
			tChart1.Axes[0].Maximum = 100;

			serie.GetPointerStyle += Serie_GetPointerStyle;

			tChart1.Series.Add(serie);
		}

		private void Serie_GetPointerStyle(Steema.TeeChart.Styles.CustomPolar series, Steema.TeeChart.Styles.GetPointerStyleEventArgs e)
		{
			e.Color = colors[e.ValueIndex];
		}