Estoy tratando de implementar la clase foxcharts, pero estoy teniendo inconvenientes con los gráficos tipo 1 y 2 el cual me genera un error, descargue la última versión desde codeplex pensando que se solucionaría mi problema, pero no doy pie con la solución, pensé que era un problema con la creación de mi gráfico mis datos o algo por el estilo, así que copie el código que trae en el ejemplo que muestra los diversos gráficos y aun así obtengo el mismo error, aquí pongo el código ejemplo en cuestión que tampoco me funciona.
CREATE CURSOR Sales( ;
CHART1 I NULL , ;
CHART2 N (8,2) NULL , ;
CHART3 N (8,2) NULL , ;
CHART4 N (8,2) NULL , ;
CHART5 N (8,2) NULL , ;
LEGEND C (30) NULL , ;
DETACH L NULL , ;
COLOR I NULL , ;
HIDE_SLICE L NULL )
INSERT INTO Sales VALUES (130, 100, 80, 55, 44, "JAN", .F., 10076365, .F.)
INSERT INTO Sales VALUES (120, 60, 40, 88, 55, "FEB", .F., 9122739, .F.)
INSERT INTO Sales VALUES (45, NULL, 75, 43, 66, "MAR", .F., 8832896, .F.)
INSERT INTO Sales VALUES (60, 70, 100, 110, 77, "APR", .F., 14528002, .F.)
INSERT INTO Sales VALUES (75, 90, NULL, 88, NULL, "MAY", .F., 11309315, .F.)
INSERT INTO Sales VALUES (110, 100, 65, 130, 100, "JUN", .F., 8567706, .F.)
SET CLASSLIB TO LOCFILE("FoxCharts.vcx")
PUBLIC oForm as Form
oForm = CREATEOBJECT("Form")
oForm.Newobject("oChart", "FoxCharts", "FoxCharts.vcx")
LOCAL loChart as FoxCharts OF "FoxCharts.vcx"
loChart = oForm.oChart
WITH loChart
.AlphaChannel = 255
.BackColor = RGB(255,255,255)
.BackColor2 = RGB(255,255,255)
.BarsSpaceBetween = 10
.BrushType = 2
.ChartsCount = 5
.ChartType = 2
.ColorType = 1
.Depth = 20
.DonutRatio = 0.50
.FieldAxis2 = 'Legend'
.FieldColor = 'Color'
.FieldDetachSlice = 'Detach'
.FieldHideSlice = 'Hide_Slice'
.FieldLegend = 'Legend'
.FontName = 'Verdana'
.Gradientlevel = 5
.Height = 444
.MarginBottom = 10
.MarginLeft = 10
.MarginRight = 10
.MarginTop = 10
.PieCompensateAngles = .T.
.PieShowPercent = .T.
.SourceAlias = 'Sales'
.Width = 902
WITH .AxisLegend2
.FontName = 'Verdana'
ENDWITH
WITH .ScaleLegend
.FontName = 'Verdana'
.ForeColor = RGB(0,128,128)
ENDWITH
WITH .ShapeLegend
.BackColor = RGB(255,255,255)
.BackColorAlpha = 128
.FontName = 'Verdana'
.ForeColor = RGB(0,0,0)
ENDWITH
WITH .SideLegend
.Alignment = 0
.FontName = 'Verdana'
.ForeColor = RGB(0,0,64)
ENDWITH
WITH .SubTitle
.Alignment = 2
.Caption = 'Chart SubTitle'
.FontName = 'Verdana'
.FontUnderline = .F.
ENDWITH
WITH .Title
.Alignment = 2
.Caption = 'Chart Main Title'
.FontItalic = .T.
.FontName = 'Verdana'
.ForeColor = RGB(0,128,255)
ENDWITH
WITH .XAxis
.Alignment = 2
.FontName = 'Verdana'
ENDWITH
WITH .YAxis
.FontName = 'Verdana'
ENDWITH
WITH .Fields(1)
.Color = RGB(0,0,128)
.FieldValue = 'Chart1'
.Legend = 'GR1'
.Shape = 5
ENDWITH
WITH .Fields(2)
.Color = RGB(162,169,167)
.FieldValue = 'Chart2'
.Legend = 'GR2'
.Shape = 8
ENDWITH
WITH .Fields(3)
.Color = RGB(192,251,74)
.FieldValue = 'Chart3'
.Legend = 'GR3'
* .Shape = &&Custom object - Xfcgraphicspath
ENDWITH
WITH .Fields(4)
.Color = RGB(152,51,238)
.FieldValue = 'Chart4'
.Legend = 'GR4'
.Shape = 'D:\SISTEMAS\FOXGRAPHCHART\FOXCHARTS_1.20\VFPXICON.PNG'
ENDWITH
WITH .Fields(5)
.Color = RGB(255,255,0)
.FieldValue = 'Chart5'
.Legend = 'GR5'
ENDWITH
loChart.DrawChart()
loChart.Visible = .T.
ENDWITH
oForm.Width = loChart.Width
oForm.Height = loChart.Height
oForm.Show()
Por ahora genero gráficos usando el ocx de mschart pero quiero tener un mejor control de todo como lo da la clase foxchart, así que estoy viendo en cambiar este código.
En otro hilo realice una solicitud si fuera posible adicionar otro tipo de gráfico a esta espectacular clase, pero no he recibido respuesta (ni positiva o negativa), en todo caso alguien que me pueda dar una mano al respecto lo agradecería.
Saludos
--
Daniel Sánchez Escobar
Investigación y Desarrollo
Reset Software & Sistemas
Móvil +051-949398047 RPM #948615385
Trujillo - Perú
P Sugerimos no imprimir este e-mail a menos que sea absolutamente necesario. Protejamos el medio ambiente.