E172 Rep Indicadores intento 2 agrupar pesos y dolar en graficas

This commit is contained in:
MLopez
2022-12-13 20:05:32 -07:00
parent f01e47513d
commit f5b89dc3f4
2 changed files with 35 additions and 25 deletions

View File

@@ -210,10 +210,10 @@ Partial Class General_RepIndicadorResumen
'Dim vxp = From s In DtVxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
'Dim group_vxp = vxp.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
' .Texto = Function(x) x.Texto.ToString,
' .Valor = Math.Round(Function(x) x.Valor, 2),
' .Texto = g.Key,
' .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
' .Unidad = "MXN"
'})
'}).ToDataTable
Dim top_vxp = From s In DtVxP.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
Dim resto_vxp = From s In DtVxP.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
Dim group_resto_vxp = resto_vxp.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {