Solved

Position on TChart

Posted on 2009-04-10
4
1,349 Views
Last Modified: 2013-11-23
hi there,

    I searched for a timeline component as in attachment (please find an attachment screenshot.jpg). Such timeline component is best suitable for my application. But unfortunately I did not get like timeline component. Could you please tell me where can I find such timeline component. If you also don't find such component, could you please tell me using what basic delphi components we can create the timeline component as in attachment.
                  Right now I am using TChart to create timeline component. I made marginleft, margintop, marginbottom, marginright to 0, hence chart1.width is equivalent to actual chart displaying area width. Here whatever the lines you are seeing in the timeline (please find an attachment screenshot1.jpg) are the series and I am able to draw the basic lines. In this timeline I want to provide "If user clicks on the chart I want to draw a vertical line on the clicked position of TChart showing that timeline has moved to user clicked position.  ChartMouseDown is giving X,Y of the Chart in pixels. Now I want to know at which position (not in pixels but in time line position number) I have to draw the line. Is there any direct function of the Chart to get the timeline position just by passing X,Y in pixels.
                   I did some calcuations (please find the code in the code section of this question) to find the timeline position depending on X,Y of chart in pixels, most of the times it is working correct, but not all the time.

                       Please help me.

               
X is the mouse down event parameter. p,q are extended type variables.
 
  p := (Chart1.BottomAxis.Maximum);
  q := Chart1.Width / p;
  x := Round((x / q));
 
  MySeries7.AddXY(x,Chart1.LeftAxis.Minimum);
  MySeries7.AddXY(x,Chart1.LeftAxis.Maximum);

Open in new window

screenshot.JPG
screenshot1.JPG
0
Comment
Question by:inampudi1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 11

Expert Comment

by:calinutz
ID: 24126790
0
 
LVL 11

Accepted Solution

by:
calinutz earned 500 total points
ID: 24180640
Well?
What do you think about my comments?
Were they helpfull?
0
 

Author Comment

by:inampudi1
ID: 24201898
                   Yes, It is helpful and has given me good information how to take processes information, but before your reply I solved my issue.
                                                                  Thank you.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question