Page 1 of 1
How to get following things ..
Posted: Thu Mar 08, 2007 1:56 pm
by 9524108
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
Posted: Thu Mar 08, 2007 4:16 pm
by narcis
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.
Posted: Thu Mar 08, 2007 5:00 pm
by 9524108
DRAWING LINES MEANS NOT LINE GRAPH , USING THE TOOL CALLED DRAW LINE ..
DO YOU HAVE EXAMPLES OF DRAWING ARROWS...
Posted: Thu Mar 08, 2007 5:02 pm
by 9524108
DRAWING ARROW MEANS ,SOMETHING SIMILAR TO DRAWING ANNOTATION RECTANGLE BOX (INSTEAD OF RECTANGLE I NEED TO DRAW ARROW ON THE GRAPH ...
Posted: Thu Mar 08, 2007 5:21 pm
by narcis
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.
Posted: Fri Mar 09, 2007 9:18 am
by 9524108
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 ...
Posted: Fri Mar 09, 2007 9:40 am
by narcis
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.
Posted: Fri Mar 09, 2007 10:25 am
by 9524108
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...
Posted: Fri Mar 09, 2007 10:35 am
by narcis
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
how can i know which line is selected..?
Posted: Mon Mar 19, 2007 12:27 pm
by 9524108
i want to use mousepointer to select the lines ,once i select using mouse and presing delete onthe keyboard should delete the selected line
Posted: Mon Mar 19, 2007 2:12 pm
by narcis
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