Solved

Question about TChart

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

Technology Partners: 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

Suggested Solutions

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

713 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