Hi,
For highest speed I want to draw multiple lineseries with pen.width=1, (win10, > 1e6 datapoints)
but for visibility I want to draw the legend symbols with pen.width=3.
I tried re-assigning the event as below: this works, the linewidth is changed, but for all series the same color is used, since the parameter AIndex = 0 for all draw operations. How can I know which line/legend is currently drawn, so I can change the pen.color?
Regards, any help is welcome
Jur
============
TLineseries(form1.chart1.Series[lijnnr]).Legend.OnDraw := @FuncSeries1ChartSeriesLegendDraw ;
procedure TForm1.FuncSeries1ChartSeriesLegendDraw(ACanvas: TCanvas;
const ARect: TRect; AIndex: Integer; AItem: TLegendItem);
begin
Unused(AIndex, AItem);
ACanvas.Pen.Width:= 3;
y0 := (ARect.Top + ARect.Bottom) div 2;
ACanvas.MoveTo(ARect.Left, y0);
w := ARect.Right - ARect.Left;
for x := 0 to w do
ACanvas.LineTo(
ARect.Left + x, y0);
end;
==================