Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yousfi Benameur
  Where is Yousfi Benameur?
 El Bayadh
 Algeria
 Yousfi Benameur
 To: frank
  Where is frank?
 
 Indonesia
 frank
 Tags
Subject: RE: FoxCharts
Thread ID: 310631 Message ID: 310697 # Views: 44 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Windows Vista and VFP
Date: Thursday, June 23, 2011 3:02:45 PM         
   


> >
> > Accordinatly to your datas,in your form.init put this code (make a particular attention to build the cursor).
> >
> > CREATE CURSOR mycurs (myChart1 n(8,2),   Month c(2))
> > INSERT INTO mycurs VALUES( 12 , "1")
> > INSERT INTO mycurs VALUES( 30,  "2")
> > INSERT INTO mycurs VALUES( 17,  "3")
> > INSERT INTO mycurs VALUES( 70,  "4")
> > INSERT INTO mycurs VALUES( 84,  "5")
> > INSERT INTO mycurs VALUES( 15,  "6")
> > *brow
> > 
> > LOCAL loChart
> > loChart = This
> > 
> > WITH loChart as FoxCharts of FoxCharts.Vcx
> > .ChartType = 4 && pOINTS
> > .ChartsCount = 1
> > .SourceAlias = "mycurs"
> > .FieldAxis2 = "Month"
> > .FieldLegend = "Month"
> > .Fields(1).FieldValue = "myChart1 " 
> > .Fields(1).Legend = "myChart1 Legend "
> > .Fields(1).Color  = RGB(100,175,213)
> > * Setting the title and subtitle
> > .Title.Caption = "FoxCharts points sample"
> > .SubTitle.Caption = ""
> > .FontName ="Tahoma"
> > 
> > * Setting the Chart Depth ( 3d effect )
> > .Depth = 0
> > * Set the backColor
> > .BackColor = RGB(255,255,255)
> > * Set the colors to Random
> > .ColorType = 2 && Random
> > * Set Colors to Gradient
> > .BrushType = 2 && Gradient colors
> > * Set the captions for the axis
> > .XAxis.Caption = "Month"
> > .YAxis.Caption = "DINARS"
> > * Set the 2nd legend
> > .AxisLegend2.Alignment = 0 && Left
> > .AxisLegend2.Rotation = 0  && 0-360 degrees
> > .AxisLegend2.FontName = "Verdana"
> > .AxisLegend2.FontSize = 12
> > * Draw the chart
> > .DrawChart()
> > ENDWITH
> > 

> >
> > with this there is no problem see this result photo :
> >
> >
> >
> > Regards
> > Yousfi Benameur
>
> OK.
>
> Then add this to the shapeMouseEnter event:
> Pay attention to the "recno()" returning value, it is the loChart.aCoord(tnCoordIndex, 10).
> And you will be amazed.
> Try changing the charttype to 5 and see the results.
>
>
> 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))
>
> *!* .aCoord(n,1) = tnX
> *!* .aCoord(n,2) = tnY
> *!* .aCoord(n,3) = tnWidth
> *!* .aCoord(n,4) = tnHeight
> *!* .aCoord(n,5) = tnValue
> *!* .aCoord(n,6) = Legend
> *!* .aCoord(n,7) = tnStart
> *!* .aCoord(n,8) = tnSweep
> *!* .aCoord(n,9) = This.ChartRow && ChartIndex
> *!* .aCoord(n,10) = RECNO()
> *!* .aCoord(n,11) = tcObjType
>
> =MESSAGEBOX(lcText,0,'')
> ELSE
> RETURN
> ENDIF
>
> *!* LOCAL lcText, loChart
> *!* loChart = Thisform.Foxcharts1
>
> IF tnCoordIndex > 0
> thisform._ch_row = loChart.aCoord(tnCoordIndex, 10)
> ELSE
> thisform._ch_row = 0
> ENDIF
>
> frank sinatha


When i open the ShapeMouseEnter method and dont find the code you sent.Before you must point to the form sample used in foxchart and the version (there is maybe many updates).
Anyhow i send you the form with the points example adapted.unzip and run (the code ask to pointing to foxcharts.vcx).
There is no problem on tooltips (compare values in grid and in tooltips).
https://www.foxite.com/uploads/9931b07a-f65a-41d1-8863-6468f0dfa273.zip

NB: when you type vfp code in this page use the balise [vfp] [/vfp] (replace [ with brackets) its have a better rendering.
Regards
Yousfi Benameur

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