Solved

Question about TChart

Posted on 2010-09-23
4
459 Views
Last Modified: 2012-05-10
Hi,

On the y-axis I want the numbers 0 to 35.
And at number 4 and 10 and need to draw
a baseline. is it possible? Can someone help
me with this?

Greetings, Peter Kiers
0
Comment
Question by:peterkiers
  • 2
4 Comments
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 33751532
is it possible ?
in short yes

tchart can dynamically set itself to dataset max and min values
you could add a second series with manually created dataset
0
 
LVL 1

Author Comment

by:peterkiers
ID: 33751599

Hi Geert,

Could you please tell me how to get the numbers 0 to 35 on the y-axis?

Be back later
0
 
LVL 25

Accepted Solution

by:
epasquier earned 500 total points
ID: 33751801
I'm not sure we have the same TChart component, I used the one in Delphi 2007 (v7.1 from Steema Software). Even if you don't have the same component the principle should remain the same.

* Add 2 series for your chart, these will be your 2 lines at 4 and 10 in the Y axis.
no data source, as the values will be created by code.
in fact I select the data source as Function y=f(x), without adding code for the calculate event.

* Set the LeftAxis properties : Minimum = 0 , Maximum = 34

* Add the following code to create the simple Y=4 & Y=10 charts
procedure TForm1.FormCreate(Sender: TObject);

Const

 MinX=0;

 MaxX=30;

begin

 With Chart.Series[0] do

  begin

   AddXY(MinX,4);

   AddXY(MaxX,4);

  end;

 With Chart.Series[1] do

  begin

   AddXY(MinX,10);

   AddXY(MaxX,10);

  end;

end;

Open in new window

TChart.gif
0
 
LVL 1

Author Comment

by:peterkiers
ID: 33752383
Thanks it works.

Greetings, Peter Kiers
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi OLE Error 8 95
Help on project with Soap 10 48
Press three keys together and trigger a function 3 51
TEMBEDDEDWB how can i change its user agent ? 8 48
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now