Solved

Question about TChart

Posted on 2010-09-23
4
458 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 36

Expert Comment

by:Geert Gruwez
Comment Utility
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
Comment Utility

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
Comment Utility
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
Comment Utility
Thanks it works.

Greetings, Peter Kiers
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

17 Experts available now in Live!

Get 1:1 Help Now