ColorEachPoint not working in Ax7 Multi-language

TeeChart for ActiveX, COM and ASP
Post Reply
Jared Cooper
Newbie
Newbie
Posts: 7
Joined: Fri May 03, 2002 4:00 am

ColorEachPoint not working in Ax7 Multi-language

Post by Jared Cooper » Tue Jun 21, 2005 10:47 am

Using PowerBuilder 10.2.

I've found inserting TCAx7 in PB10.2 using the Control Type 'TeeChart ProActivex control' I can add a series with ColorEachPoint and it works ok. However, if I use Control Type 'TeeChart Pro Activex control v7' (the multi-language OCX) the series appears with all points black.

The series is an XY-scatter using the following code:

Code: Select all

	tchart.Legend.Visible = FALSE
	tchart.AddSeries(scPoint)
	tchart.series(0).asPoint.pointer.style = psDiagCross
	tchart.series(0).asPoint.pointer.horizontalsize = 2
	tchart.series(0).asPoint.pointer.verticalsize = 2
	tchart.series(0).ColorEachPoint = TRUE
	
	long lv_count
	dec{3} ldec_dlg
	dec{3} ldec_sl
	integer li_point
	long ll_colour
	
	FOR lv_count = 1 TO dw_data.RowCount()
		
		CHOOSE CASE ii_data
		CASE 1
			ldec_dlg = dw_data.GetItemNumber(lv_count, 'da_book_dlg')
			ldec_sl = dw_data.GetItemNumber(lv_count, 'da_sl_today')
		CASE 2
			ldec_dlg = dw_data.GetItemNumber(lv_count, 'da_act_dlg')
			ldec_sl = dw_data.GetItemNumber(lv_count, 'da_sl_today')
		CASE 3
			ldec_dlg = dw_data.GetItemNumber(lv_count, 'da_raw_dlg')
			ldec_sl = dw_data.GetItemNumber(lv_count, 'da_raw_sl_today')
		END CHOOSE
		
		IF dw_data.GetItemNumber(lv_count, 'da_deliveries') <> 0 THEN
			ll_colour = 255
		ELSE
			ll_colour = RGB(0,0,255)
		END IF
		
		li_point = tchart.series(0).AddXY(ldec_sl, ldec_dlg, '', ll_colour)
		
	NEXT
Is this a known issue (I can't find it in the release notes) with the multi-lang variant of the control?

Any suggestions?

Thanks

Pep
Site Admin
Site Admin
Posts: 3148
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jun 27, 2005 3:00 pm

Hi,

I can't reproduce the problem here, I can see different colors using the Multilanguage version setting ColorEachPoint to true. Does this happens simply adding a chart component (multilanguage version) into a vb form ? If so, could you please post the example into the news://www.steema.net/steema.public.attachments newsgroup ?

Jared Cooper
Newbie
Newbie
Posts: 7
Joined: Fri May 03, 2002 4:00 am

Post by Jared Cooper » Tue Jun 28, 2005 9:49 am

Pep,

Thanks for your assistance - I've posted a VB6 example for you in the newsgroup as requested.

Jared

Pep
Site Admin
Site Admin
Posts: 3148
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Jun 29, 2005 7:57 am

Hi Jared,

yes, this is normal behaviour (it happens in all the versions). To change the color of the pointer (having set it to cross..) you'll have to use similar code to the following :

Code: Select all

Private Sub TChart1_OnGetSeriesPointerStyle(ByVal SeriesIndex As Long, ByVal ValueIndex As Long, AStyle As TeeChart.EPointerStyle)
If ValueIndex = 0 Then
TChart1.Series(0).asPoint.Pointer.Pen.Color = vbBlue
Else
TChart1.Series(0).asPoint.Pointer.Pen.Color = vbRed
End If
End Sub

Jared Cooper
Newbie
Newbie
Posts: 6
Joined: Fri Oct 01, 2004 4:00 am

Post by Jared Cooper » Tue Jul 05, 2005 4:22 pm

Pep,

Sorry it's taken so long to check out your suggestion.....

I've tested your code suggestion and it doesn't work in PowerBuilder (though it did in VB) - the ongetseriespointerstyle event isn't getting fired in powerbuilder.

This is the only real problem I've had with the multi-language OCX (so far at least) and I can work round it by not setting the point style to cross (the default square works with coloreachpoint in powerbuilder so the users will have to make do with this for now), but I'd prefer to get the crosses working again if you have any other suggestions to try.

One other thing I've noticed (which may or may not be related to this problem) is that the file version of the multi-language cab is shown as 7.0.0.2 even though the about box shows 7.0.0.4.

Thanks

Pep
Site Admin
Site Admin
Posts: 3148
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jul 18, 2005 3:08 pm

Hi Jared,
One other thing I've noticed (which may or may not be related to this problem) is that the file version of the multi-language cab is shown as 7.0.0.2 even though the about box shows 7.0.0.4.
Yes, you're correct, it's a minor bug, I forgot to change it in when I make the installer, it should show 7.04 as in About box (which has the correct version) . I'll recreate it.

Post Reply