Foros del Web » Programación para mayores de 30 ;) » Programación General » Visual Basic clásico »

Utilizar ChartSpace web components

Estas en el tema de Utilizar ChartSpace web components en el foro de Visual Basic clásico en Foros del Web. Como están los grandes programadores que hacen posible este gran sitio. Espero que me ayuden con mi problema. Estoy trabajando con el componente chartspace en ...
  #1 (permalink)  
Antiguo 06/12/2006, 12:43
Ign
 
Fecha de Ingreso: septiembre-2005
Mensajes: 17
Antigüedad: 18 años, 8 meses
Puntos: 0
Pregunta Utilizar ChartSpace web components

Como están los grandes programadores que hacen posible este gran sitio.
Espero que me ayuden con mi problema. Estoy trabajando con el componente chartspace en vb6, y el asunto es con un ejemplo específico que no lo puedo hacer correr y necesito este ejemplo porque no utiliza una bd para llenar el gráfico. Marcaré en negrita los principales problemas de compilación.

Private Sub Command1_Click()

'Create arrays for the x-values and the y-values
Dim xValues As Variant, yValues1 As Variant, yValues2 As Variant
xValues = Array("Beverages", "Condiments", "Confections", _
"Dairy Products", "Grains & Cereals", _
"Meat & Poultry", "Produce", "Seafood")
yValues1 = Array(104737, 50952, 78128, 117797, 52902, 80160, 47491, _
62435)
yValues2 = Array(20000, 15000, 36000, 56000, 40000, 18000, 20000, _
33000)

'Create a new chart
Dim oChart As WCChart
ChartSpace1.Clear
ChartSpace1.Refresh
Set oChart = ChartSpace1.Charts.Add

'Add a title to the chart
oChart.HasTitle = True
oChart.Title.Caption = "Sales Per Category"

'Add a series to the chart with the x-values and y-values
'from the arrays and set the series type to a column chart

Dim oSeries As WCSeries
Set oSeries = oChart.SeriesCollection.Add
With oSeries
.Caption = "1995"
.SetData chDimCategories, chDataLiteral, xValues
.SetData chDimValues, chDataLiteral, yValues1
.Type = chChartTypeColumnClustered
End With

'Add another series to the chart with the x-values and y-values
'from the arrays and set the series type to a line chart
Set oSeries = oChart.SeriesCollection.Add
With oSeries
.Caption = "1996"
.SetData chDimCategories, chDataLiteral, xValues
.SetData chDimValues, chDataLiteral, yValues2
.Type = chChartTypeLineMarkers
End With

'Add a value axis to the right of the chart for the second series
oChart.Axes.Add oChart.Axes(chAxisPositionLeft).Scaling, _
chAxisPositionRight, chValueAxis

'Format the Value Axes
oChart.Axes(chAxisPositionLeft).NumberFormat = "$#,##0"
oChart.Axes(chAxisPositionRight).NumberFormat = "0"
oChart.Axes(chAxisPositionLeft).MajorUnit = 20000
oChart.Axes(chAxisPositionRight).MajorUnit = 20000

'Show the legend at the bottom of the chart
oChart.HasLegend = True
oChart.Legend.Position = chLegendPositionBottom

End Sub

Este ejemplo lo baje de la página de MSDN, pero no lo puedo hacer correr. Si pueden ayudarme o mostrarme otro ejemplo se los agradeceré.
  #2 (permalink)  
Antiguo 24/11/2009, 16:06
 
Fecha de Ingreso: noviembre-2009
Mensajes: 1
Antigüedad: 14 años, 5 meses
Puntos: 0
Respuesta: Utilizar ChartSpace web components

Yo tb he bajado ese ejemplo y me sale el mismo error, trate de cambiar la sentencia

Dim oBarChart As WCChart

con

Dim oBarChart As OWC11.ChartSpace

pero nada... Agradeceria mucho su ayuda en este asunto
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:23.