Page 1 of 1

Teechart Legend Symbol for PieChart

Posted: Wed Dec 10, 2008 2:03 pm
by 13047002
If I want to adjust the Border for the Symbols in the Legend it only ever adjusts the first item in the Series.

legend.Symbol.DefaultPen = false;
legend.Symbol.Pen.Visible = true;
legend.Symbol.Pen.Color = Color.Black;
legend.Symbol.Pen.Width = 1;

Does the same with the Charteditor.

Posted: Wed Dec 10, 2008 2:22 pm
by narcis
Hi Luke,

Code below works fine for me here using latest TeeChart for .NET v3 release available at the client area It also works fine at designtime. Which version are you using?

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

		void InitializeChart()
		{
			Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);

			line1.FillSampleValues();

			tChart1.Legend.Symbol.DefaultPen = false;
			tChart1.Legend.Symbol.Pen.Visible = true;
			tChart1.Legend.Symbol.Pen.Color = Color.Red;
			tChart1.Legend.Symbol.Pen.Width = 3; 
		}
Thanks in advance.

Posted: Wed Dec 10, 2008 2:41 pm
by 13047002
Steema.TeeChart.Styles.Pie Pie = new Steema.TeeChart.Styles.Pie(tChart1.Chart);
for (int x = 0; x < 10; x++)
{
Pie.Add(x, "Label " + x.ToString(), Color.Aqua);
}
Pie.Pen.Visible = true;
tChart1.Legend.Symbol.DefaultPen = false;
tChart1.Legend.Symbol.Pen.Visible = true;
tChart1.Legend.Symbol.Pen.Color = Color.Red;
tChart1.Legend.Symbol.Pen.Width = 3;

try this if you set series pen.visible = false only the first is set ;-)

Posted: Wed Dec 10, 2008 3:12 pm
by narcis
Hi Luke,

Thanks for the information. I could reproduce the issue here now and added it (TF02013646) to the defect list to be fixed.