Board index » delphi » TChart Pro 4 - problem with TErrorSeries colors

TChart Pro 4 - problem with TErrorSeries colors

David,

I'm really happy that you included the new TErrorSeries in TChart 4. However it
seems to me that there's a problem with the colors. I need different data
points to be colored differently, but it looks like that's not presently
possible by normal means.

Since TErrorSeries is descended from TBarSeries, it seems that the user can't
control the color of the ErrorPen on a point-by-point basis. That might be ok
for a BarSeries (though even in this case, it would be nice to have an option
for each error "T" to be colored the same as its bar).

But for an ErrorSeries, it's a significant problem. The specified color is
ignored, and all data points are plotted in the same color.

Or maybe I'm missing something about how the ErrorPen is used?

It seems to me that method TCustomErrorSeries.DrawError should have a color
parameter, which would be used when IDrawBar is false (or, if you agree with my
suggestion above, when the "ErrorPenMatchesBarColor" option is true).

Any chance of this happening any time soon? I'm very new to TChart (it's
great!) and don't know how everything interacts, so I'm reluctant to change
your code, though it looks as though it would be straightforward.

In the meantime, I'm thinking of doing a kludge in my own code where I use your
data array access techniques to override the ChartValueList for the X values,
and then in the GetValue method, set the ErrorPen color of the series to match
the current point. Would that work?

Thanks,

Jonathan March

(To email me, remove the phrases "RemoveThisPhrase" and "NoSpam" from the
address in the header).

 

Re:TChart Pro 4 - problem with TErrorSeries colors


Hi Jonathan
Thanks for your comments !!

I've modified the "Error-Series" component to accept
the standard "ValueColor" property, so now each "error"
point can show with an specific color.

This will be part of the next coming free 4.01 TeeChart Pro upgrade.
Thanks and regards !
David Berneda
www.teemach.com
ps:  I've answered you by email too, with attached new ErrorBar.pas unit.

Quote
Jonathan March wrote in message ...
>David,

>I'm really happy that you included the new TErrorSeries in TChart 4.
However it
>seems to me that there's a problem with the colors. I need different data
>points to be colored differently, but it looks like that's not presently
>possible by normal means.

>Since TErrorSeries is descended from TBarSeries, it seems that the user
can't
>control the color of the ErrorPen on a point-by-point basis. That might be
ok
>for a BarSeries (though even in this case, it would be nice to have an
option
>for each error "T" to be colored the same as its bar).

>But for an ErrorSeries, it's a significant problem. The specified color is
>ignored, and all data points are plotted in the same color.

>Or maybe I'm missing something about how the ErrorPen is used?

>It seems to me that method TCustomErrorSeries.DrawError should have a color
>parameter, which would be used when IDrawBar is false (or, if you agree
with my
>suggestion above, when the "ErrorPenMatchesBarColor" option is true).

>Any chance of this happening any time soon? I'm very new to TChart (it's
>great!) and don't know how everything interacts, so I'm reluctant to change
>your code, though it looks as though it would be straightforward.

>In the meantime, I'm thinking of doing a kludge in my own code where I use
your
>data array access techniques to override the ChartValueList for the X
values,
>and then in the GetValue method, set the ErrorPen color of the series to
match
>the current point. Would that work?

>Thanks,

>Jonathan March

>(To email me, remove the phrases "RemoveThisPhrase" and "NoSpam" from the
>address in the header).

Re:TChart Pro 4 - problem with TErrorSeries colors


David,

This works great. Many thanks for the fast fix!

Jonathan

Other Threads