Hello,
I have a chart with TBar-Series.
Since the look of the color gradient on my bars, SeriesColor is not the color I would like to represent the respective series in the legend.
Instead I would like to have Gradient.MidColor as the color by which the series is represented in the legend.
Is there a way to achieve this?
Thanks a lot!
BTW: I am running TeeChart 8.04 Pro ond Delphi VCL 2006.
Define legend color for a series?
Hi Windwalker,
I think you should do something similar to the example at All features/Miscellaneous/Legend/Symbol OnDraw in the new features demo available at TeeChart's program group.
I hope this helps
I think you should do something similar to the example at All features/Miscellaneous/Legend/Symbol OnDraw in the new features demo available at TeeChart's program group.
I hope this helps
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 14
- Joined: Mon Apr 20, 2009 12:00 am
Thanks for your hint!
Could you please give me some advise, on how I can draw a rectangle with my intended color and then place this rectangle by the use of StretchDraw in the legend?
I tried to do it like this, but StrechtDraw does not accept my Rect-Object.
Thanks again!
Could you please give me some advise, on how I can draw a rectangle with my intended color and then place this rectangle by the use of StretchDraw in the legend?
I tried to do it like this, but StrechtDraw does not accept my Rect-Object.
Code: Select all
procedure TForm_DTM_UmsatzStat.LegendDraw(Sender: TObject; Series:TChartSeries;
ValueIndex:Integer; R:TRect);
var
symbol : TRect;
begin
Brush.Style := bsSolid;
Brush.Color := clRed; // or any other color
symbol := Rect(R.Left, R.Top, R.Right, R.Bottom);
Chart_Umsatz.Canvas.StretchDraw(R, symbol);
end;
-
- Newbie
- Posts: 14
- Joined: Mon Apr 20, 2009 12:00 am