Visual Basic - datagrid y mschart

Life is soft - evento anual de software empresarial
 
Vista:

datagrid y mschart

Publicado por genosol (8 intervenciones) el 11/01/2010 19:20:25
Buenas tardes,
El resultado de una consulta mostrado en un datagrid es columna 1 (nombre) y columna 2 (horas), con n filas. Quería mostrar el resultado en un mschart. Lo cierto es que no entiendo el mschart. Me pueden ayudar??
Gracias

MSChart1.rowCount = 1 8para que sólo me aparezca una gráfica y no 14)
MSChart1.columnCount = DGgeneral.VisibleRows (=14)
MSChart1.row = 1
MSChart1.RowLabel = "REPARTO HORAS POR TIPO PROYECTO"
Dim c As Integer
For c = 1 To MSChart1.columnCount
MSChart1.column = c
MSChart1.ColumnLabel = nombretipoproyecto & c
MSChart1.DataGrid.SetData 1, c, c, 0 'row,col,data, flag
Next

'para mostrar valores de las porciones (que no se corresponden con las que tengo en el datagrid)
Dim I As Integer
With Me.MSChart1
For I = 1 To .Plot.SeriesCollection.Count
With .Plot.SeriesCollection(I).DataPoints(-1).DataPointLabel
.LocationType = VtChLabelLocationTypeOutside
.VtFont.Size = 8 'Tamaño del Font
.VtFont.VtColor.Set 255, 0, 0 'Color del Font
.component = VtChLabelComponentValue 'Valor que se muestra
End With
Next I
End With
'para la leyenda
With MSChart1.Legend
.Location.Visible = True
.Location.LocationType = 1
.VtFont.VtColor.Set 0, 0, 0
.VtFont.Name = "century gothic"
.VtFont.Size = 8
End With
MSChart1.Legend.Location.Visible = True
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