Bollinger function...

TeeChart for ActiveX, COM and ASP
Post Reply
Denis
Newbie
Newbie
Posts: 11
Joined: Thu Oct 26, 2006 12:00 am
Contact:

Bollinger function...

Post by Denis » Wed Nov 01, 2006 9:54 am

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 ?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 02, 2006 11:36 am

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
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Denis
Newbie
Newbie
Posts: 11
Joined: Thu Oct 26, 2006 12:00 am
Contact:

Post by Denis » Thu Nov 02, 2006 12:50 pm

Hi,

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 02, 2006 12:54 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 02, 2006 4:06 pm

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();
			
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply