How do I control the colours for a Candle?

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
RogerNye
Newbie
Newbie
Posts: 11
Joined: Mon Jan 12, 2009 12:00 am

How do I control the colours for a Candle?

Post by RogerNye » Fri Sep 24, 2010 5:43 pm

Hi,
The Candle series colours individual candles automatically based on the price values.
Is there a way to override this logic?

It appears to choose the colour based on whether open > close, whereas I want previous close > close.

I tried playing around with the pen and brush colours, but can only affect the outline colour.

At a guess, it looks like I could sub-class Candle and override the calculateColor method.

Is this the best approach or is there a more direct method?

Many thanks
Roger

RogerNye
Newbie
Newbie
Posts: 11
Joined: Mon Jan 12, 2009 12:00 am

Re: How do I control the colours for a Candle?

Post by RogerNye » Fri Sep 24, 2010 6:46 pm

It's OK, I've got it.
I sub-classed Candle, overrode drawValue(int), fiddled the up and down colors and the pen color according to my logic and then called the super-class method.

Post Reply