How to get following things ..

TeeChart for ActiveX, COM and ASP
Post Reply
daryl
Newbie
Newbie
Posts: 91
Joined: Thu Sep 09, 2004 4:00 am
Location: UK
Contact:

How to get following things ..

Post by daryl » Thu Mar 08, 2007 1:56 pm

1. i want to set back ground image but i dnot need the chart area background to be this image ,instead i need color ...

( now i can do the viceversa by putting the image in chart area and outside i can have the colors ..)


2. i use draw lines function to draw . i have drawn couple of lines say l1,l2 l3 . now i want to delete only l2.. how to do this ...?

3. is there any way to draw shapes like arrow ...


Could you update me on this asap
Daryl

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Mar 08, 2007 4:16 pm

Hi daryl,
1. i want to set back ground image but i dnot need the chart area background to be this image ,instead i need color ...

( now i can do the viceversa by putting the image in chart area and outside i can have the colors ..)
You can do this by setting an image for TeeChart's panel and a colour for TeeChart's back wall:

Code: Select all

Private Sub Form_Load()
    TChart1.Panel.BackImageLoad "c:\temp\3dsurface.jpg"
    TChart1.Walls.Back.Transparent = False
    TChart1.Walls.Back.Color = vbRed
    
    TChart1.Series(0).FillSampleValues 10
    TChart1.Series(1).FillSampleValues 10
    TChart1.Series(2).FillSampleValues 10
End Sub
2. i use draw lines function to draw . i have drawn couple of lines say l1,l2 l3 . now i want to delete only l2.. how to do this ...?
You can use RemoveSeries method:

Code: Select all

Private Sub Command1_Click()
    TChart1.RemoveSeries 1
End Sub
3. is there any way to draw shapes like arrow ...


TeeChart already has arrow series. I recommend you to use this series style to draw arrows.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

daryl
Newbie
Newbie
Posts: 91
Joined: Thu Sep 09, 2004 4:00 am
Location: UK
Contact:

Post by daryl » Thu Mar 08, 2007 5:00 pm

DRAWING LINES MEANS NOT LINE GRAPH , USING THE TOOL CALLED DRAW LINE ..

DO YOU HAVE EXAMPLES OF DRAWING ARROWS...

daryl
Newbie
Newbie
Posts: 91
Joined: Thu Sep 09, 2004 4:00 am
Location: UK
Contact:

Post by daryl » Thu Mar 08, 2007 5:02 pm

DRAWING ARROW MEANS ,SOMETHING SIMILAR TO DRAWING ANNOTATION RECTANGLE BOX (INSTEAD OF RECTANGLE I NEED TO DRAW ARROW ON THE GRAPH ...

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Mar 08, 2007 5:21 pm

Hi daryl,

Have you looked at arrow series? Those arrows don't need to have a line series like layout, they can be placed anywhere you want into the chart. Also, you can even write text on them using their marks.

If this doesn't help please let us know what are you exactly trying to get and we will try to suggest the more appropriate solution.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

daryl
Newbie
Newbie
Posts: 91
Joined: Thu Sep 09, 2004 4:00 am
Location: UK
Contact:

Post by daryl » Fri Mar 09, 2007 9:18 am

like a annotation tool i want to create the arrows .. ( i dnot want arrow series ...)

some thing similar to rectangle annotation tool, you added and move as per the user and still you can add text on top of it ...

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Mar 09, 2007 9:40 am

Hi daryl,

Sorry but we don't have such feature at the moment. The only way I can think of to achieve what you request is using arrow series, as shown in the features demo example (All Features\Welcome!\Chart Styles\Standard\Arrow), use something as in this thread to drag arrows and finally use series marks for the arrows text.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

daryl
Newbie
Newbie
Posts: 91
Joined: Thu Sep 09, 2004 4:00 am
Location: UK
Contact:

Post by daryl » Fri Mar 09, 2007 10:25 am

DRAWING LINES MEANS NOT LINE GRAPH , USING THE TOOL CALLED DRAW LINE ..

using this method i draw several lines in the chart now i want to delete onlyone line ,how can i do ?

i am using drawline in tools...

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Mar 09, 2007 10:35 am

Hello,
DRAWING LINES MEANS NOT LINE GRAPH , USING THE TOOL CALLED DRAW LINE ..
I know and understand this. In my previous messages I just tried to tell you, IMHO, the best way I could think of to achieve what you requested as an specific feature for that doesn't exist.
using this method i draw several lines in the chart now i want to delete onlyone line ,how can i do ?
You can do something like this:

Code: Select all

Private Sub Command1_Click()
    TChart1.Tools.Items(0).asDrawLine.DeleteSelected
End Sub
or this:

Code: Select all

Private Sub Command1_Click()
    TChart1.Tools.Items(0).asDrawLine.Lines.Delete (0)
    TChart1.Repaint
End Sub
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

daryl
Newbie
Newbie
Posts: 91
Joined: Thu Sep 09, 2004 4:00 am
Location: UK
Contact:

how can i know which line is selected..?

Post by daryl » Mon Mar 19, 2007 12:27 pm

i want to use mousepointer to select the lines ,once i select using mouse and presing delete onthe keyboard should delete the selected line

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Mar 19, 2007 2:12 pm

Hi daryl,

With arrow series you can achieve what you request like this:

Code: Select all

Dim Index As Long

Private Sub Form_Load()
    TChart1.Series(0).FillSampleValues 10
    Index = -1
End Sub

Private Sub TChart1_OnClickSeries(ByVal SeriesIndex As Long, ByVal ValueIndex As Long, ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
    If SeriesIndex = 0 Then
        Index = ValueIndex
    End If
End Sub

Private Sub TChart1_OnKeyDown(ByVal KeyCode As Long, ByVal Shift As TeeChart.EShiftState)
    If ((KeyCode = vbKeyDelete) And (Index <> -1)) Then
        TChart1.Series(0).Delete Index
    End If
    
    Index = -1
End Sub
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply