Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: frank
  Where is frank?
 
 Indonesia
 frank
 To: Koen Piller
  Where is Koen Piller?
 Santpoort-Zuid
 Netherlands
 Koen Piller
 Tags
Subject: RE: FoxCharts
Thread ID: 310631 Message ID: 310744 # Views: 36 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Windows Vista and VFP
Date: Friday, June 24, 2011 3:50:59 AM         
   


> >
> > Hello Koen,
> >
> > Please find my reply to Yousfi.
> >
> > Thank you.
> >
> > frank sinatha
>
> Frank,
>
> I see no problem, when I do this in either the thisForm.FoxCharts.MouseMove method or in the thisForm.FoxCharts.ShapeMouseEnter method. Still believe there is a data problem, please upload and elaborate your problem.
>
> Regards,
>
> Koen


Hello Koen,

I did solve this problem.
It is not a data problem.

I just wanted to share my experience about the 'bug' in this FoxChart.
I do like this FoxChart and I think it is really a great class and it is free too :)
I hope Ceasar will fix this bug soon.

What happen is that it does not give you an error in the tooltip label until you elaborate it further.
In my case I need to make a tablet app, where user click/tap on the dots and give you a report based on the dot value.
Using the legend information is not enough to determine a key field to do the filter in the table.
So, I need to tweak it a little bit but I do need something to use as a key, and here is the recno() comes in handy.

I works fine with line and bar type chart but when my client ask for a multicharts, a combination of dot/point and a line chart then I found this bug.
The return value is 'not' right from the "aCoord(tnCoordIndex, 10)"

I have investigate this further by adding this script on ShapeMouseEnter event:
LPARAMETERS nButton, nShift, nXCoord, nYCoord, tnValue, tcLegend, tnCoordIndex
LOCAL lcText, loChart
loChart = Thisform.Foxcharts1

IF tnCoordIndex > 0

lcText = "X = " + TRANSFORM(loChart.aCoord(tnCoordIndex, 1)) + CHR(13) + ;
"Y = " + TRANSFORM(loChart.aCoord(tnCoordIndex, 2)) + CHR(13) + ;
"Width = " + TRANSFORM(loChart.aCoord(tnCoordIndex, 3)) + CHR(13) + ;
"Height = " + TRANSFORM(loChart.aCoord(tnCoordIndex, 4)) + CHR(13) + ;
"Value = " + TRANSFORM(loChart.aCoord(tnCoordIndex, 5)) + CHR(13) + ;
"Legend = " + TRANSFORM(loChart.aCoord(tnCoordIndex, 6)) + CHR(13) + ;
"Start = " + TRANSFORM(loChart.aCoord(tnCoordIndex, 7)) + CHR(13) + ;
"Sweep = " + TRANSFORM(loChart.aCoord(tnCoordIndex, 8)) + CHR(13) + ;
"Chart Index = " + TRANSFORM(loChart.aCoord(tnCoordIndex, 9)) + CHR(13) + ;
"RECNO() = " + TRANSFORM(loChart.aCoord(tnCoordIndex, 10)) + CHR(13) + ;
"Object Type = " + TRANSFORM(loChart.aCoord(tnCoordIndex, 11))


=MESSAGEBOX(lcText,0,'')
ELSE
RETURN
ENDIF

using the same script for init from Yousfi you will find that the first and the second point have the same record number information.
(see the pictures attached), which is totally wrong.

Try to change the charttype to 5 && a line chart (this will give you the right recno())

So, where is the culprit?
It's over here inside the foxcharts class at foxcharts._updatecoordinate

This.aCoord(n,10) = IIF(NOT EMPTY(This._Currentrow), This._CurrentRow, RECNO())

recno() will give you 0 for the first point!!!!

and then it will give you 1,2,3,4...

since it is 0 then this._currentrow will take care of it and replace it will 1
and as a result you will have this recno() feedback= 1,1,2,3,4,5,....
and your whole reports will be messed up because of this.

the solution is to use:
This.aCoord(n,10) = This._Currentrow when the charttype=4

Thank you so much for your replies.

Long live FoxPro!!

frank sinatha



ENTIRE THREAD

FoxCharts Posted by frank sinatha @ 6/23/2011 5:02:24 AM
RE: FoxCharts Posted by Koen Piller @ 6/23/2011 9:10:21 AM
RE: FoxCharts Posted by frank sinatha @ 6/23/2011 2:20:57 PM
RE: FoxCharts Posted by Koen Piller @ 6/24/2011 2:49:10 AM
RE: FoxCharts Posted by frank sinatha @ 6/24/2011 3:50:59 AM
RE: FoxCharts Posted by Koen Piller @ 6/24/2011 10:39:52 AM
RE: FoxCharts Posted by Yousfi Benameur @ 6/23/2011 12:56:44 PM
RE: FoxCharts Posted by frank sinatha @ 6/23/2011 2:20:23 PM
RE: FoxCharts Posted by Yousfi Benameur @ 6/23/2011 3:02:45 PM
RE: FoxCharts Posted by frank sinatha @ 6/24/2011 3:53:04 AM
RE: FoxCharts Posted by Yousfi Benameur @ 6/24/2011 12:41:00 PM
RE: FoxCharts Posted by Koen Piller @ 6/24/2011 12:52:44 PM
RE: FoxCharts Posted by Yousfi Benameur @ 6/25/2011 8:34:02 AM
RE: FoxCharts Posted by Koen Piller @ 6/26/2011 1:36:07 AM
RE: FoxCharts Posted by Yousfi Benameur @ 6/26/2011 8:54:44 PM
RE: FoxCharts Posted by Mike Yearwood @ 6/27/2011 2:19:48 AM