Page 1 of 1

ColorEachPoint not working in Ax7 Multi-language

Posted: Tue Jun 21, 2005 10:47 am
by 6922718
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.series(0) = 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')
		IF dw_data.GetItemNumber(lv_count, 'da_deliveries') <> 0 THEN
			ll_colour = 255
			ll_colour = RGB(0,0,255)
		li_point = tchart.series(0).AddXY(ldec_sl, ldec_dlg, '', ll_colour)
Is this a known issue (I can't find it in the release notes) with the multi-lang variant of the control?

Any suggestions?


Posted: Mon Jun 27, 2005 3:00 pm
by Pep

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:// newsgroup ?

Posted: Tue Jun 28, 2005 9:49 am
by 6922718

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


Posted: Wed Jun 29, 2005 7:57 am
by Pep
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
TChart1.Series(0).asPoint.Pointer.Pen.Color = vbRed
End If
End Sub

Posted: Tue Jul 05, 2005 4:22 pm
by 9524402

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 even though the about box shows


Posted: Mon Jul 18, 2005 3:08 pm
by Pep
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 even though the about box shows
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.