?
Solved

Position on TChart

Posted on 2009-04-10
4
Medium Priority
?
1,356 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 1500 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

762 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