Page 1 of 1

Gantt Left Axis Label display

Posted: Mon Aug 01, 2005 2:43 pm
by 9524644
Using Visual Foxpro 9 with TeeChart Activex Control v7.0.0.4.

I have a chart that contains 5 Gantt series. Data is put on 7 different vertical axis. The 5th series is the only series on the 7th vertical axis.

The problem is that the left label on the 7th vertical axis does not display, unless I deactivate all of the other series via the legend or issue series#.active = .F.

I also tried to add a series1 data item to the 7th vertical axis, and add a series5 data item to the 1st vertical axis but neither helped.

I also put some display debugging code in the OnGetAxisLabel event. The event for series5 is not triggered until I un-active all of the other 4 series.

What am I missing here?

Posted: Tue Aug 02, 2005 10:12 am
by Pep
Hi ken,

dos this custom axis have any Serie assigned to it ?
If so, would you be so kind to post a simple example into the news://www.steema.net/steema.public.attachments newsgroup with which I can reproduce the problem "as is" here ?

Posted: Tue Aug 02, 2005 1:42 pm
by 9524644
Yes, series5 (.Series[4]) is attached to vertical axis 7. I am using the following code to add the data to the chart. Graph_Tunnel_Data is a VFP cursor...

Code: Select all

.Series[4].asGantt.AddGanttColor(Graph_Tunnel_Data.BOF_Date, Graph_Tunnel_Data.EOF_Date, Graph_Tunnel_Data.Vert_Position, ALLTRIM(Graph_Tunnel_Data.Washer),Graph_Tunnel_Data.GUIColor)
BTW, I am now using v7.0.0.5. Also, I had another set of data which generated series5 data on multiple vertical axis and the left axis labels appeared just fine. Quite odd.

Anyway I have posted a KTBChartProb.zip file containing KTB.TEE and a VFP Form KTBCHART. If you have VFP 9 the KTBCHART form simply loads the KTB.TEE file into the TeeChart Activex control. If you click on the chart it will call ShowEditor. There's also a KTBChartWorks.Tee file where all of the descriptions are working. I have noticed that some of the descriptions do not appear on the vertical axis for other series also.
I included KTBchartNotWork.Tee in the zip file to demonstrate that problem.

Thanks for your help!

Posted: Wed Aug 03, 2005 10:49 am
by Pep
Hi ken,
BTW, I am now using v7.0.0.5. Also, I had another set of data which generated series5 data on multiple vertical axis and the left axis labels appeared just fine. Quite odd.
Does this mean that the v7.05 solves your problem ?

Posted: Wed Aug 03, 2005 11:28 am
by 9524644
No, sometimes it displays labels, most times not. Have you looked at the charts I uploaded?

Posted: Thu Aug 04, 2005 8:41 am
by Pep
Hi Ken,

yes, I've check it, but I cannot see which the problem is. Could you please send me two images (to the newsgroup) where I can see which should be the correct and bad one ?

Posted: Thu Aug 04, 2005 1:35 pm
by 9524644
OK Josep, I uploaded the images. I previously uploaded native TEE files. Whay can't you use those with the activex control in any software you choose?

Posted: Mon Aug 08, 2005 2:19 pm
by Pep
Hi Ken,
OK Josep, I uploaded the images. I previously uploaded native TEE files. Whay can't you use those with the activex control in any software you choose?
Ok, thanks. Yes, I can see them but I was not sure what you're referencing. Now I've seen where the problem is. It happens because the "Program Time" serie does not contain the Labels of the 6th and 7th point of the "Actual Runtime" Serie (or have others as you can see in the Data tab of the TeeChart Editor). Changing the order of the Series (placing the Actual Runtime Series at the first place you will notice that the labels appear). The Chart will display only the labels which have the first Serie.

Posted: Mon Aug 08, 2005 2:51 pm
by 9524644
OK I think I understand but that's a problem, since the other 4 series may or may not contain series1 (Program Time) data. Plus the Tunnel Washer series data never contains data in any other series.

What I don't understand is that the "Tunnel Washer" Series never has data in any other series, but sometimes it displays labels. If you look at the KTBCHARTWORKS.TEE file you will see data for the Tunnel Washers series and the labels are displaying. I think it works with this one because there are more Tunnel Washer Series data than series1 data.
The Chart will display only the labels which have the first Serie.
Is there any way around this? Should I create a "fake" series1 that will insert one point for each series but somehow never display anything, or is there another way to arrange the data?

Thanks for your help on this...

Posted: Mon Aug 08, 2005 9:06 pm
by 9524644
OK, I think I have resolved this issue by adding a Gantt series0 that all it does is add a label for each vertical point, at the minimum date for the entire chart, and the style property for the series is set to nothing.

Thanks for your help Pep.

BTW I have been noticing a lot of Windows Protection fault errors when running my mouse over a chart that uses the MarkTips tool, so you may want to look into that.

Posted: Tue Aug 09, 2005 10:26 am
by Pep
Hi,
OK, I think I have resolved this issue by adding a Gantt series0 that all it does is add a label for each vertical point, at the minimum date for the entire chart, and the style property for the series is set to nothing.
Ok, I think it's the best option.
BTW I have been noticing a lot of Windows Protection fault errors when running my mouse over a chart that uses the MarkTips tool, so you may want to look into that.
Thanks for the advise. We've been looking into this and we've tried to change some things for the latest maintenance release v7.05 in order to avoid this problems. Also, we've added another technique to show MarkTips for the Series (you can see one example under :
F:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual Basic\Visual Basic 5 & 6\MouseOverHints ).

Posted: Tue Aug 09, 2005 12:40 pm
by 9524644
Yeah, I do not see the exception errors if I disable the MarkTips tool.
we've added another technique to show MarkTips for the Series
Cool code for the alternative to MarkTips Tool. I modified it to keep track of the series the mouse is over via the OnMouseEnterSeries and OnMouseLeaveSeries events. Then it calls a custom method to retrive the text based on the series and the valueindex. Here's the VFP code if anyone is interested...

Code: Select all

*** OnMouseMove ActiveX Control Event ***
LPARAMETERS shift, x, y
LOCAL nIndex,nSeries

&& Maintained via OnMouseEnterSeries and OnMouseLeaveSeries events...
IF THISFORM.nwfcchartseries < 0	
	RETURN
ENDIF
nSeries = THISFORM.nwfcchartseries
WITH THIS
	&& Get ValueIndex...
	nIndex = .Series[nSeries].Clicked(X, Y)
    WITH THIS.Tools.Items[0]
		IF nIndex <> -1 Then
			IF THISFORM.nWfcchartindex  <> nIndex Then
            	.Active = .T.
				.asAnnotation.Left = x
				.asAnnotation.Top = y
			ENDIF
			&& Call to get text based on Series and ValueIndex...
			.asAnnotation.Text = THISFORM.Set_Mark_Text("",nSeries,nIndex) 
		ELSE
			.Active = .F.
		ENDIF
		&& Save Index so we don't keep repeating it...
    THISFORM.nWfcchartindex=nIndex
	ENDWITH
ENDWITH



***OnMouseSeries ActiveX Control Event ***
LPARAMETERS seriesindex

THISFORM.nwfcchartseries = seriesindex  && Save series for OnMouseMove event


*** OnMouseLeaveSeries ActiveX Control Event ***
LPARAMETERS seriesindex

THISFORM.nwfcchartindex = -1	&& Tells OnMouseMove to ignore mouse movement
THISFORM.nwfcchartseries = -1



Thanks again