Drawing Shapes on TCharts

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
0scar
Newbie
Newbie
Posts: 2
Joined: Thu Mar 15, 2012 12:00 am

Drawing Shapes on TCharts

Post by 0scar » Mon Dec 10, 2012 3:43 pm

Hi, I'm struggling with the TChart framework to create a small application which draw quadratic functions. I am not very experienced with all the functionality of the framework. I hope the community can share some expertise.

My application:
Any 3 points form a quadratic/parabola. I managed to draw quadratic functions based on 3 points from user input using TLineSeries.

My problem:
Wat I would like to do is to create 3 shapes on the chart representing the 3 user input point. I would like to be able to move these points with the mouse and recalculate the quadratic. I have trouble with creating the 3 shapes on top of the chart. I have tried the DragMarks functionality, but these do not seem to work exactly as I would like to. Painting a square over the 3 points do display the points, but cannot be moved.

Somebody has a sugggestion?

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Drawing Shapes on TCharts

Post by Yeray » Tue Dec 11, 2012 11:23 am

Hi,

Give it a try to the TRectangleTool. This tool supports drag and resize. I guess you aren't interested in resize, so you could disable it.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

0scar
Newbie
Newbie
Posts: 2
Joined: Thu Mar 15, 2012 12:00 am

Re: Drawing Shapes on TCharts

Post by 0scar » Thu Dec 13, 2012 8:15 am

Thanks for the suggestion. I will give it a try.

Regards,
Oscar

Post Reply