Autor Beitrag
Lake
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 78


D6 prof., Delphi 10.2 Tokyo
BeitragVerfasst: Mo 22.01.07 14:09 
Hallo,

ich zeichne eine vertikale Linie in ein Chart. Dies funktioniert auch.

Nun soll diese Linie farbig und 3 breit sein. Hier ist das Problem, trotz Pen.color und Pen.width wird die Linie nur in normaler Breite und nicht farbig gezeichnet. Wo liegt hier der Fehler?

Bei einer horizontalen Linie funktionieren die Pen-Angaben ohne Probleme.


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
procedure TfrmZGrafik.Series1AfterDrawValues(Sender: TObject);
var
  t,
  x,
  y  : LongInt;
begin
  if not (Form1.iGrafikMonat = 0) then
  begin
    x:=Series1.CalcXPos( Form1.iGrafikMonat );  // akutelles Monat
    y:=Series1.CalcYPos( Form1.iGrafikMonat);

    Canvas.Pen.Color:=clFuchsia;               //  <<<<< das funktioniert vertikal nicht, horizontal funktioniert es  
    Canvas.Pen.Width := 3;                     //  <<<<< 

    QRDBChart1.Canvas.MoveTo(x-8,QRDBChart1.ChartBounds.top + 30 );
    QRDBChart1.Canvas.LineTo(x-8,QRDBChart1.ChartBounds.bottom - 75 );
  end;
end;

_________________
Gruss Lake
nivosta
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 35



BeitragVerfasst: Mo 22.01.07 14:15 
Hi,

du änderst ja nich das canvas von QRDBChart1(Zeile 15) sondern das vom Fenster (Zeile 12).
Lake Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 78


D6 prof., Delphi 10.2 Tokyo
BeitragVerfasst: Mo 22.01.07 14:38 
Danke, Danke und Schande über mich, ich habe das nicht erkannt.

_________________
Gruss Lake
nivosta
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 35



BeitragVerfasst: Mo 22.01.07 14:47 
Kein problem, manchmal ist das halt so.

Gruß
Hubert