Actualizar Grafico de Chart
Publicado por Carlos (9 intervenciones) el 16/07/2012 15:56:20
Como hacer lo siguiente:
Formulario:
1 Chart
1 Timer
Codigo:
=====================================
Load:
Llamo a la funcion Graficar
=====================================
Funcion Graficar
Query:
SELECT Producto, SUM(Total) as Total from TABLA_1
GROUP BY Producto
Lleno un DataSet "DS" por medio del DataAtapter.Fill
Chart1.Series("Series1").XValueMember = "Producto"
Chart1.Series("Series1").YValueMember = "Total"
Chart1.DataSource = Origen.Tables("TABLA_1")
======================================
Timer:
Llamo a la funcion Graficar
======================================
Al hacer el load todo anda bien, el problema es cuando quiere graficar la 2da vez... el grafico no actualiza los datos
***DEBERIA ACTUALIZAR YA QUE LA BASE DE DATOS ESTA SIENDO ACTUALIZADA
CONSTANTEMENTE CON LAS VENTAS
Gracias
Formulario:
1 Chart
1 Timer
Codigo:
=====================================
Load:
Llamo a la funcion Graficar
=====================================
Funcion Graficar
Query:
SELECT Producto, SUM(Total) as Total from TABLA_1
GROUP BY Producto
Lleno un DataSet "DS" por medio del DataAtapter.Fill
Chart1.Series("Series1").XValueMember = "Producto"
Chart1.Series("Series1").YValueMember = "Total"
Chart1.DataSource = Origen.Tables("TABLA_1")
======================================
Timer:
Llamo a la funcion Graficar
======================================
Al hacer el load todo anda bien, el problema es cuando quiere graficar la 2da vez... el grafico no actualiza los datos
***DEBERIA ACTUALIZAR YA QUE LA BASE DE DATOS ESTA SIENDO ACTUALIZADA
CONSTANTEMENTE CON LAS VENTAS
Gracias
Valora esta pregunta


0