Search found 5 matches

by Achim
Tue Apr 12, 2005 10:31 pm
Forum: VCL
Topic: TChart7.04 Get drawn YValue by known XValue
Replies: 4
Views: 6649

procedure TForm1.ChartTool1Change(Sender: TCursorTool; x, y: Integer; const XValue, YValue: Double; Series: TChartSeries; ValueIndex: Integer); begin Chart1.Title.Text.Text:=FormatFloat('#.00',YValue); end; Hi Narcís, Code like this, I've tried first. :-) But the YValue is the value of the mouse cu...
by Achim
Tue Apr 12, 2005 1:19 pm
Forum: VCL
Topic: TChart7.04 Get drawn YValue by known XValue
Replies: 4
Views: 6649

Hi, procedure TForm1.ChartTool1Change(Sender: TCursorTool; x, y: Integer; const XValue, YValue: Double; Series: TChartSeries; ValueIndex: Integer); begin if (Series1.Clicked(X,Y)<>-1) then Chart1.Title.Text.Text:=FloatToStr(Series.YValues[Series.Clicked(X,Y)]); end; Unfortunately 'Clicked' dosen't ...
by Achim
Tue Apr 12, 2005 9:51 am
Forum: VCL
Topic: TChart7.04 Get drawn YValue by known XValue
Replies: 4
Views: 6649

TChart7.04 Get drawn YValue by known XValue

I'm using TAreaSeries. How can I calculate the YValue on the drawn Line by a given XValue? Example: Point 1 in the Serie: X=1 Y=10 Point 2 in the Serie: X=3 Y=30 I'm geting the XValue=2 by the Cursortool(between two points). The result must be Y=20 if stairs:=false. I've tried to calulate it myself,...
by Achim
Thu Mar 24, 2005 2:58 pm
Forum: VCL
Topic: TChar 7.04 Change Leftaxis Min/Max
Replies: 1
Views: 3778

TChar 7.04 Change Leftaxis Min/Max

Put a TChart with a TAreaSeries to a form. Use following code and zoom with the mouse. The Leftaxis-Minimum/maximum change every time you zoom. procedure TForm4.Button1Click(Sender: TObject); var i:integer; begin for i := 0 to 100 do Series1.AddXY(i,i); Chart1.Zoom.Direction:=tzdHorizontal; Chart1.L...
by Achim
Thu Mar 24, 2005 2:51 pm
Forum: VCL
Topic: TChart 7.04 draw outside the Clientwindow
Replies: 1
Views: 3936

TChart 7.04 draw outside the Clientwindow

Put a TChart with a TAreaSeries to a form. Then use following code: procedure TForm4.Button2Click(Sender: TObject); begin Chart1.View3D:=false; Series1.Transparency:=100; Series1.AreaLinesPen.Visible:=false; Series1.AddXY(now -0.1 ,10); Series1.AddXY(now +0.1 ,10); Series1.AddXY(now ,10); Chart1.Bot...