Hi Folks.
I want to display different icons in the TChart. I'm currently running Version 6.0.0.5 In the forum I found something like ImagePoint but this seems to be only available in V7 ? Is there another solution? I also played around with Canvas:StretchDraw but with Canvas I cant display anything at all (are the Top,Left,Bottom,Right positions the X-Y-Coordinates or Coordinates relative to the screen?).
thx in advance
images in TChart
Hi,
using the latest maintenance release of the TeeChart Pro v6 you can assign images to the pointers using similar code to the following :
using the latest maintenance release of the TeeChart Pro v6 you can assign images to the pointers using similar code to the following :
Code: Select all
Private Sub Form_Load()
TeeCommander1.Chart = TChart1
Dim myPath
With TChart1
.Aspect.View3D = False
.AddSeries scPoint
.Series(0).FillSampleValues 10
myPath = "C:\Archivos de Programa\Steema Software\TeeChart Pro v6 ActiveX Control\Examples\Visual Basic\TeeChartAXV6Demo\BrushStyles"
ImageList1.ListImages.Add , , LoadPicture(myPath & "\TeeBrush1.bmp")
ImageList1.ListImages.Add , , LoadPicture(myPath & "\TeeBrush2.bmp")
ImageList1.ListImages.Add , , LoadPicture(myPath & "\TeeBrush3.bmp")
ImageList1.ListImages.Add , , LoadPicture(myPath & "\TeeBrush4.bmp")
.Series(0).asPoint.Pointer.VerticalSize = 10
.Series(0).asPoint.Pointer.HorizontalSize = 10
End With
End Sub
Private Sub TChart1_OnGetSeriesPointerStyle(ByVal SeriesIndex As Long, ByVal ValueIndex As Long, AStyle As TeeChart.EPointerStyle)
TChart1.Series(0).asPoint.Pointer.Brush.Color = vbYellow
If ValueIndex + 1 = 1 Then
TChart1.Series(0).asPoint.Pointer.Brush.AssignImage ImageList1.ListImages.Item(1).Picture
Else
TChart1.Series(0).asPoint.Pointer.Brush.AssignImage ImageList1.ListImages.Item(4).Picture
End If
End Sub
The coordinates are relative to the TeeChart object, in the case you want to draw any object into the teechart canvas the best way is to place the custom objects relative to the teechart objects (axis, labels, series, etc..), this will allow to do a zoom and scroll with these custom objects.Canvas:StretchDraw but with Canvas I cant display anything at all (are the Top,Left,Bottom,Right positions the X-Y-Coordinates or Coordinates relative to the screen?).
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 2
- Joined: Thu Nov 27, 2003 5:00 am
- Contact:
[quote="Pep"]Hi,
using the latest maintenance release of the TeeChart Pro v6 you can assign images to the pointers...
[/code]
Hi Pep.
Thanks for your reply. I already tried it that way before. But I have the following problem: If I use a small image (like an icon) the image isnt centered/filled inside the Point I added but painted (virtually) over and over to fill the whole TChart. So the image doesnt fit inside the Point but I randomly see only some part of the image...
using the latest maintenance release of the TeeChart Pro v6 you can assign images to the pointers...
[/code]
Hi Pep.
Thanks for your reply. I already tried it that way before. But I have the following problem: If I use a small image (like an icon) the image isnt centered/filled inside the Point I added but painted (virtually) over and over to fill the whole TChart. So the image doesnt fit inside the Point but I randomly see only some part of the image...
Hi,
yes, this feature is not available (allow to stretch the image in the
pointer), it's on our wish list to be considered for further releases.
yes, this feature is not available (allow to stretch the image in the
pointer), it's on our wish list to be considered for further releases.
Pep Jorge
http://support.steema.com
http://support.steema.com