Gantt Left Axis Label display
Gantt Left Axis Label display
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?
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?
TIA
Ken
Ken
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 ?
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 ?
Pep Jorge
http://support.steema.com
http://support.steema.com
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...
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!
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)
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!
Hi ken,
Does this mean that the v7.05 solves your problem ?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.
Pep Jorge
http://support.steema.com
http://support.steema.com
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 ?
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 ?
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi Ken,
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.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?
Pep Jorge
http://support.steema.com
http://support.steema.com
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.
Thanks for your help on this...
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.
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?The Chart will display only the labels which have the first Serie.
Thanks for your help on this...
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.
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.
Hi,
F:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual Basic\Visual Basic 5 & 6\MouseOverHints ).
Ok, I think it's the best option.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 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 :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.
F:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual Basic\Visual Basic 5 & 6\MouseOverHints ).
Pep Jorge
http://support.steema.com
http://support.steema.com
Yeah, I do not see the exception errors if I disable the MarkTips tool.
Thanks again
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...we've added another technique to show MarkTips for the Series
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