Visual Basic - Problema con MSChart

Life is soft - evento anual de software empresarial
 
Vista:

Problema con MSChart

Publicado por byron (12 intervenciones) el 16/02/2004 19:41:42
Please, alguien que me pueda ayudar con el siguiente problema:
Tengo un mschart en mi proyecto y al cargar la forma lo presento como pastel, luego el usuario puede cambiar el gráfico a barras y hasta allí no hay problema. El problema es que al volverlo a presentar en forma de pastel, ya no se muestra la etiqueta con los porcentajes de cada columna, aunque las porciones de cada una sí son correctas; el único problema es con la etiqueta. Qué me falta para que se no pierda esto??? Les envío el código:

Private Sub cmdBarras_Click()
Dim ind As Integer

With MSChart1
.chartType = VtChChartType2dBar
For ind = 1 To .ColumnCount
With .Plot.SeriesCollection(ind).DataPoints(-1).DataPointLabel
.Component = VtChLabelComponentValue
.LocationType = VtChLabelLocationTypeOutside
.VtFont.Size = 8
.ValueFormat = "##.##0"
End With
Next
End With
End Sub

Private Sub cmdPastel_Click()
Dim ind As Integer

With MSChart1
For ind = 1 To .ColumnCount
With .Plot.SeriesCollection(ind).DataPoints(-1).DataPointLabel
.Component = VtChLabelComponentPercent
.LocationType = VtChLabelLocationTypeOutside
.VtFont.Size = 8
.PercentFormat = "0,0%"
End With
Next
.chartType = VtChChartType2dPie
End With
End Sub
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