FoxPro/Visual FoxPro - Microsoft Chart Control 6.0

 
Vista:
Imágen de perfil de Analia

Microsoft Chart Control 6.0

Publicado por Analia (186 intervenciones) el 05/01/2007 17:29:34
Hola !!, quiero hacer grafico de barras utilizando "Microsoft Chart Control 6.0"
Como asocio una tabla ha este control ?
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

RE:Microsoft Chart Control 6.0

Publicado por Ernesto Hernandez (4623 intervenciones) el 05/01/2007 17:39:56
Prueba algo asi

Primero inserta el control en la forma

thisform.msgraph.charttype= 1 && VtChChartType2dBar
OR
thisform.Olecontrol1.charttype= 14 && VtChChartType2dPie

Olecontrol1
USE vdata
GO TOP
title1= country
val1 = price
SKIP 1
title2= country
val2 = price
SKIP 1
title3= country
val3 = price
SKIP 1
title4= country
val4 = price

thisform.Olecontrol1.columnCount=4
thisform.Olecontrol1.rowCount=1
thisform.Olecontrol1.row=1
thisform.Olecontrol1.column=1
thisform.Olecontrol1.columnLabel= title1
thisform.Olecontrol1.Data = val1
thisform.Olecontrol1.column=2
thisform.Olecontrol1.columnLabel= title2
thisform.Olecontrol1.Data = val2
thisform.Olecontrol1.column=3
thisform.Olecontrol1.columnLabel = title3
thisform.Olecontrol1.Data = val3
thisform.Olecontrol1.column=4
thisform.Olecontrol1.columnLabel = title4
thisform.Olecontrol1.Data = val4
thisform.Olecontrol1.showLegend= .T.
thisform.Olecontrol1.rowLabelCount= 3


Suerte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de Analia

RE:Microsoft Chart Control 6.0

Publicado por Analia (186 intervenciones) el 05/01/2007 18:36:21
Hola !!, como asocio el grafico ha una tabla ?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:Microsoft Chart Control 6.0

Publicado por Ernesto Hernandez (4623 intervenciones) el 05/01/2007 19:50:51
**** ----------------------------------------------------------------------
**** -------------- GRAFICA-------------------------------------------
**** -----------------------------------------------------------------------
SELECT mygraph1
* parm1 - "AUTOGRAPH" && requerido
nChartType = 3 && * parm2 - tipo de chart (number)
nChartSubType = 1 && * parm3 - subtipo de chart (number)
cTitle = " " && * parm4 - titulo (si no esta vacio)

lSeriesByRow = .F. && * parm5 - series by fila (.T.), por columna (.F.)
lAddLegend = .T. && * parm6 - leyenda (.T.)
lUseAutoformat = .T. && * parm7 - usar autoformat (.F.)
cOutFile = "c:\test\mygraph.dbf" && * parm8 - namedel DBF para la grafica
cModGen = .T. && * parm9 - no abrir la grafica cuando termine
* parm10 - show nulls

DO (_GENGRAPH) WITH "AUTOGRAPH", nChartType, nChartSubType, cTitle, lSeriesByRow,lAddLegend,lUseAutoformat,cOutFile,cModGen

**** ----------------------------------------------------------------------
**** ----------AGREGAR TABLA DE DATOS-------------------
**** ----------------------------------------------------------------------

SELECT mygraph
cGField = "olegraph" && General field
oGform =CreateObject("form")
oGform.ADDOBJECT("ole1","oleboundcontrol")
oGraphRef = m.oGform.ole1
oGraphRef.ControlSource = m.cGField
oGraphRef.HasDataTable = .T.
oGraphRef.DataTable.HasBorderOutline = .T.
oGraphRef.DataTable.Font.Name = "arial"
oGraphRef.DataTable.Font.Size = 10
oGraphRef.DataTable.Font.Italic = .T.
oGraphRef.ChartTitle.Caption = "COMPARISON"
oGraphRef.refresh
** BROWSE

SELECT mygraph0
REPLACE olechart WITH mygraph.olegraph
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de Analia

RE:Microsoft Chart Control 6.0

Publicado por Analia (186 intervenciones) el 06/01/2007 18:03:35
Hola !!, existe alguna forma de hacerlo sin codigo.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:Microsoft Chart Control 6.0

Publicado por Ernesto Hernandez (4623 intervenciones) el 06/01/2007 18:27:38
Probablemente puedas hacerlo atravez de la propiedad tag del control ms chart.

Suerte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Microsoft Chart Control 6.0

Publicado por Plinio (7841 intervenciones) el 06/01/2007 12:34:01
Busca en www.fpress.com la palabra "MSCHART" hay buenos articulos ahi.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar