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 - fix to id=1451 broke ColorEach functionality in Polar series
Summary: fix to id=1451 broke ColorEach functionality in Polar series
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- regression
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-08 05:56 EST by christopher ireland
Modified: 2018-03-09 03:31 EST (History)
0 users

See Also:
Chart Series: Polar
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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];
		}