Page 1 of 1

Series Band Tool decreases the transparency on every refresh

Posted: Mon Mar 10, 2008 5:48 pm
by 13048149
Every time refresh is clicked “for the code below” you can see the transparency decreases or the band gets darker.

private void refreshToolStripMenuItem_Click(object sender, EventArgs e)
{
tChart1.Chart.Series.RemoveAllSeries();
tChart1.Chart.Series.Add(fastLine1);
tChart1.Chart.Series.Add(fastLine2);
tChart1.Tools.Remove(seriesBandTool1);
tChart1.Tools.Add(seriesBandTool1);
seriesBandTool1.Series = fastLine1;
seriesBandTool1.Series2 = fastLine2;
seriesBandTool1.Brush.Color = Color.FromKnownColor(KnownColor.LightSeaGreen);
seriesBandTool1.Brush.Transparency = 97;
}

Posted: Tue Mar 11, 2008 12:22 pm
by narcis
Hi Srinivas,

Thanks for reporting. For now you need to use what you request as in the code below. We have included a change for the next maintenance release so that you don't need this workaround anymore.

Code: Select all

		private Steema.TeeChart.Styles.FastLine fastLine1;
		private Steema.TeeChart.Styles.FastLine fastLine2;
		private Steema.TeeChart.Tools.SeriesBandTool seriesBandTool1; 

		private void InitializeChart()
		{
			 fastLine1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
			 fastLine2 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
			 seriesBandTool1 = new Steema.TeeChart.Tools.SeriesBandTool(tChart1.Chart);

			 fastLine1.FillSampleValues();
			 fastLine2.FillSampleValues();
		}

		private void button1_Click(object sender, EventArgs e)
		{
			tChart1.Series.Clear();
			tChart1.Tools.Remove(seriesBandTool1);

			fastLine1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
			fastLine2 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);

			fastLine1.FillSampleValues();
			fastLine2.FillSampleValues();

			tChart1.Series.Add(fastLine1);
			tChart1.Series.Add(fastLine2);
			tChart1.Tools.Add(seriesBandTool1);

			seriesBandTool1.Series = fastLine1;
			seriesBandTool1.Series2 = fastLine2;
			seriesBandTool1.Brush.Color = Color.FromKnownColor(KnownColor.LightSeaGreen);
			seriesBandTool1.Brush.Transparency = 97;
		}

Posted: Tue Mar 11, 2008 12:38 pm
by 13048149
Thanks.