[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to start using TVtChart?

Posted on 2007-10-01
4
Medium Priority
?
962 Views
Last Modified: 2008-01-09
I am trying to show a nice 2D chart in my application.
My first selection is TVtChart.

It looks nice and is for free.

The problem is I do not know how to start with it.
1. How can I programmaticaly add some data into it?
2. How can I use this component just to display some data and do not allow user to edit it?

Thank you very much

panJames
0
Comment
Question by:panJames
  • 2
  • 2
4 Comments
 
LVL 18

Expert Comment

by:Johnjces
ID: 19994171
First, I wouldn't use TvTChart. Too much a pain in the rear. But, there should be a help file for the ActiveX component under

C:\Program Files\Borland\Delphi5\Ocx\Chartfx\cfx2ocx.hlp

I got this off my at work D5 installation and "should" be similar to your installation.

Might get you going anyway.

John
0
 

Author Comment

by:panJames
ID: 19996856
So which component would you use?

panJames
0
 
LVL 18

Accepted Solution

by:
Johnjces earned 1500 total points
ID: 19998882
I would use the TChart which comes with Delphi. There is a commercial version but the one that usually ships with Delphi works fairly well.

Have you tried it/looked it over?

John
0
 

Author Comment

by:panJames
ID: 20022821
Yes, and I have one more question if I may :)

How to change Left and Bottom axis labels programatically?
I tried many things, this one turned to be the best:

procedure TObjectAnalisysForm.Chart1GetAxisLabel(Sender: TChartAxis;
  Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
begin
  case cbAnalisys.ItemIndex of //labels depend on this selection
    0 : begin
          if Sender = Chart1.LeftAxis then
            LabelText := AAA';

          if Sender = Chart1.BottomAxis then
            LabelText := 'BBB';

        end;
    1 : begin
          if Sender = Chart1.LeftAxis then
            LabelText := CCC';

          if Sender = Chart1.BottomAxis then
            LabelText := DDD';
        end;
    end;
end;

but it creates too many labels.

It is hard to believe that it is so difficult to change such a simple thing!

panJames
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses
Course of the Month19 days, 12 hours left to enroll

872 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