Page 1 of 1

Bollinger function...

Posted: Wed Nov 01, 2006 9:54 am
by 9532893
Hi,
I'm using bollinger function and i want set different color for upper and lower lines, but after call CheckDataSource function that lines has one color - series color.Is it possible to set individual color for line ?

Posted: Thu Nov 02, 2006 11:36 am
by narcis
Hi Denis,

Yes, you can do something like this:

Code: Select all

Private Sub Form_Load()
    'Bar Series
    TChart1.Series(0).FillSampleValues 10
    
    'Bollinger Bands
    TChart1.Series(1).Color = vbRed
    TChart1.Series(2).Color = vbBlue
End Sub

Posted: Thu Nov 02, 2006 12:50 pm
by 9532893
Hi,

It isn't work... after call CheckDataSource function that lines has indentical color

Posted: Thu Nov 02, 2006 12:54 pm
by narcis
Hi Denis,

Could you please send us a simple example we can run "as-is" to reproduce the problem here? You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.

Posted: Thu Nov 02, 2006 4:06 pm
by narcis
Hi Denis,

Thank you very much for the example. I could reproduce the problem here and added it (TV52011866) to our defect list to be fixed for future releases.

In the meantime, a workaround is setting the color again after executing CheckDataSource:

Code: Select all

		private void _btnSetColor_Click(object sender, System.EventArgs e)
		{
			SetBollingerColor();		
		}

		private void SetBollingerColor()
		{
			_axTChart1.Series(1).Color = (uint)ColorTranslator.ToOle(Color.Red);
			_axTChart1.Series(2).Color = (uint)ColorTranslator.ToOle(Color.Blue);
		}

		private void _btnCheckDataSource_Click(object sender, System.EventArgs e)
		{
			_axTChart1.Series(1).CheckDataSource();