Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -500,9 +500,6 @@
|
|||||||
|
|
||||||
const chartconfig = {
|
const chartconfig = {
|
||||||
chart: {
|
chart: {
|
||||||
animation: {
|
|
||||||
duration: 500
|
|
||||||
},
|
|
||||||
marginRight: 50
|
marginRight: 50
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
@@ -513,9 +510,10 @@
|
|||||||
enabled: false
|
enabled: false
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: "category"
|
type: 'category'
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
|
//min: 0,
|
||||||
opposite: true,
|
opposite: true,
|
||||||
tickPixelInterval: 150,
|
tickPixelInterval: 150,
|
||||||
title: {
|
title: {
|
||||||
@@ -524,17 +522,17 @@
|
|||||||
stackLabels: {
|
stackLabels: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
formatter: function () {
|
formatter: function () {
|
||||||
return Highcharts.numberFormat(this.total, null, null, ',');
|
return Highcharts.numberFormat(this.total, 2, null, ',');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
labels: {
|
// labels: {
|
||||||
style: {
|
// style: {
|
||||||
color: 'red'
|
// color: 'red'
|
||||||
},
|
// },
|
||||||
formatter: function () {
|
// formatter: function () {
|
||||||
return Highcharts.numberFormat(this.value, null, null, ',');
|
// return Highcharts.numberFormat(this.value, null, null, ',');
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
//tooltip: {
|
//tooltip: {
|
||||||
// formatter: function (tooltip) {
|
// formatter: function (tooltip) {
|
||||||
@@ -551,19 +549,19 @@
|
|||||||
//},
|
//},
|
||||||
plotOptions: {
|
plotOptions: {
|
||||||
series: {
|
series: {
|
||||||
animation: false,
|
animation: true,
|
||||||
groupPadding: 0,
|
groupPadding: 0,
|
||||||
pointPadding: 0.1,
|
pointPadding: 0.1,
|
||||||
borderWidth: 0,
|
borderWidth: 0,
|
||||||
colorByPoint: true,
|
colorByPoint: true,
|
||||||
//dataSorting: {
|
//dataSorting: {
|
||||||
// enabled: false,
|
// enabled: true,
|
||||||
// matchByName: true
|
// matchByName: true
|
||||||
//},
|
//},
|
||||||
stacking: 'normal',
|
stacking: 'normal',
|
||||||
type: "bar",
|
type: 'bar',
|
||||||
dataLabels: {
|
dataLabels: {
|
||||||
enabled: true,
|
enabled: false,
|
||||||
// format: '${y}'
|
// format: '${y}'
|
||||||
// formatter: function () {
|
// formatter: function () {
|
||||||
// var defaultlabel = Highcharts.getOptions().plotOptions[this.point.series.type].dataLabels.formatter.call(this);
|
// var defaultlabel = Highcharts.getOptions().plotOptions[this.point.series.type].dataLabels.formatter.call(this);
|
||||||
@@ -573,6 +571,14 @@
|
|||||||
// formatter: function () {
|
// formatter: function () {
|
||||||
// return this.total;
|
// return this.total;
|
||||||
// },
|
// },
|
||||||
|
},
|
||||||
|
animation: {
|
||||||
|
duration: 750
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pie: {
|
||||||
|
dataLabels: {
|
||||||
|
enabled: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -603,6 +609,10 @@
|
|||||||
newData.push([point.Texto, point.Valor, point.Unidad]);
|
newData.push([point.Texto, point.Valor, point.Unidad]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//newData.sort(function (a, b) {
|
||||||
|
// return a[0] > b[0] ? 1 : -1;
|
||||||
|
//});
|
||||||
|
console.log(JSON.stringify(newData))
|
||||||
return newData;
|
return newData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -192,30 +192,27 @@ Partial Class General_RepIndicadorResumen
|
|||||||
'DtVxP.Columns.Add("Color")
|
'DtVxP.Columns.Add("Color")
|
||||||
DtVxP.Columns.Add("Unidad")
|
DtVxP.Columns.Add("Unidad")
|
||||||
'RowColorIndex = 0
|
'RowColorIndex = 0
|
||||||
If GvVxP.DataSource IsNot Nothing Then
|
For Each Dr As DataRow In CType(GvVxP.DataSource, DataTable).FiltraParametros("", "SubTotalMN DESC").Rows
|
||||||
For Each Dr As DataRow In CType(GvVxP.DataSource, DataTable).FiltraParametros("", "SubTotalMN DESC").Rows
|
If Not Dr("Orden").ToString = "" Then
|
||||||
If Not Dr("Orden").ToString = "" Then
|
Dim Row = DtVxP.NewRow()
|
||||||
Dim Row = DtVxP.NewRow()
|
Row("Texto") = Dr("GPO").ToString
|
||||||
Row("Texto") = Dr("GPO").ToString
|
Row("Valor") = Dr("SubTotalMN").ToString.FormatoNumero
|
||||||
Row("Valor") = Dr("SubTotalMN").ToString.FormatoNumero
|
Row("Unidad") = "MXN" '$"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||||
Row("Unidad") = "MXN" '$"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
DtVxP.Rows.Add(Row)
|
||||||
DtVxP.Rows.Add(Row)
|
'RowColorIndex += 1
|
||||||
'RowColorIndex += 1
|
'If RowColorIndex = 17 Then
|
||||||
'If RowColorIndex = 17 Then
|
' RowColorIndex = 0
|
||||||
' RowColorIndex = 0
|
'End If
|
||||||
'End If
|
End If
|
||||||
End If
|
Next
|
||||||
Next
|
Dim vxp = From s In DtVxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
End If
|
Dim group_vxp = vxp.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
|
.Texto = g.Key,
|
||||||
'Dim vxp = From s In DtVxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
'Dim group_vxp = vxp.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
.Unidad = "MXN"
|
||||||
' .Texto = Function(x) x.Texto.ToString,
|
}).ToDataTable
|
||||||
' .Valor = Math.Round(Function(x) x.Valor, 2),
|
Dim top_vxp = From s In group_vxp.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
' .Unidad = "MXN"
|
Dim resto_vxp = From s In group_vxp.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
'})
|
|
||||||
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 {
|
Dim group_resto_vxp = resto_vxp.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
.Texto = "Otros",
|
.Texto = "Otros",
|
||||||
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
@@ -238,8 +235,14 @@ Partial Class General_RepIndicadorResumen
|
|||||||
Row("Unidad") = "Kg"
|
Row("Unidad") = "Kg"
|
||||||
DtCompProductores.Rows.Add(Row)
|
DtCompProductores.Rows.Add(Row)
|
||||||
Next
|
Next
|
||||||
Dim top_comp_productores = From s In DtCompProductores.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
Dim comp_productores = From s In DtCompProductores.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
Dim resto_comp_productores = From s In DtCompProductores.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
Dim group_comp_productores = comp_productores.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
|
.Texto = g.Key,
|
||||||
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
|
.Unidad = "MXN"
|
||||||
|
}).ToDataTable
|
||||||
|
Dim top_comp_productores = From s In group_comp_productores.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
|
Dim resto_comp_productores = From s In group_comp_productores.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
Dim group_resto_comp_productores = resto_comp_productores.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
Dim group_resto_comp_productores = resto_comp_productores.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
.Texto = "Otros",
|
.Texto = "Otros",
|
||||||
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
@@ -261,8 +264,14 @@ Partial Class General_RepIndicadorResumen
|
|||||||
DtCompAcreed.Rows.Add(Row)
|
DtCompAcreed.Rows.Add(Row)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Dim top_comp_acreed = From s In DtCompAcreed.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
Dim comp_acreed = From s In DtCompAcreed.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
Dim resto_comp_acreed = From s In DtCompAcreed.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
Dim group_comp_acreed = comp_acreed.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
|
.Texto = g.Key,
|
||||||
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
|
.Unidad = "MXN"
|
||||||
|
}).ToDataTable
|
||||||
|
Dim top_comp_acreed = From s In group_comp_acreed.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
|
Dim resto_comp_acreed = From s In group_comp_acreed.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
Dim group_resto_comp_acreed = resto_comp_acreed.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
Dim group_resto_comp_acreed = resto_comp_acreed.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
.Texto = "Otros",
|
.Texto = "Otros",
|
||||||
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
@@ -284,8 +293,14 @@ Partial Class General_RepIndicadorResumen
|
|||||||
DtCxC.Rows.Add(Row)
|
DtCxC.Rows.Add(Row)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Dim top_cxc = From s In DtCxC.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
Dim cxc = From s In DtCxC.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
Dim resto_cxc = From s In DtCxC.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
Dim group_cxc = cxc.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
|
.Texto = g.Key,
|
||||||
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
|
.Unidad = "MXN"
|
||||||
|
}).ToDataTable
|
||||||
|
Dim top_cxc = From s In group_cxc.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
|
Dim resto_cxc = From s In group_cxc.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
Dim group_resto_cxc = resto_cxc.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
Dim group_resto_cxc = resto_cxc.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
.Texto = "Otros",
|
.Texto = "Otros",
|
||||||
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
@@ -308,8 +323,14 @@ Partial Class General_RepIndicadorResumen
|
|||||||
DtCxCR.Rows.Add(Row)
|
DtCxCR.Rows.Add(Row)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Dim top_cxcr = From s In DtCxCR.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
Dim cxcr = From s In DtCxCR.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
Dim resto_cxcr = From s In DtCxCR.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
Dim group_cxcr = cxcr.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
|
.Texto = g.Key,
|
||||||
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
|
.Unidad = "MXN"
|
||||||
|
}).ToDataTable
|
||||||
|
Dim top_cxcr = From s In group_cxcr.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
|
Dim resto_cxcr = From s In group_cxcr.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
Dim group_resto_cxcr = resto_cxcr.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
Dim group_resto_cxcr = resto_cxcr.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
.Texto = "Otros",
|
.Texto = "Otros",
|
||||||
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
@@ -331,8 +352,14 @@ Partial Class General_RepIndicadorResumen
|
|||||||
DtCxP192.Rows.Add(Row)
|
DtCxP192.Rows.Add(Row)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Dim top_cxp192 = From s In DtCxP192.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
Dim cxp192 = From s In DtCxP192.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
Dim resto_cxp192 = From s In DtCxP192.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
Dim group_cxp192 = cxp192.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
|
.Texto = g.Key,
|
||||||
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
|
.Unidad = "MXN"
|
||||||
|
}).ToDataTable
|
||||||
|
Dim top_cxp192 = From s In group_cxp192.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
|
Dim resto_cxp192 = From s In group_cxp192.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
Dim group_resto_cxp192 = resto_cxp192.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
Dim group_resto_cxp192 = resto_cxp192.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
.Texto = "Otros",
|
.Texto = "Otros",
|
||||||
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
@@ -354,8 +381,14 @@ Partial Class General_RepIndicadorResumen
|
|||||||
DtCxP.Rows.Add(Row)
|
DtCxP.Rows.Add(Row)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Dim top_cxp = From s In DtCxP.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
Dim cxp = From s In DtCxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
Dim resto_cxp = From s In DtCxP.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
Dim group_cxp = cxp.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
|
.Texto = g.Key,
|
||||||
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
|
.Unidad = "MXN"
|
||||||
|
}).ToDataTable
|
||||||
|
Dim top_cxp = From s In group_cxp.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
|
Dim resto_cxp = From s In group_cxp.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Unidad = s("Unidad").ToString()}
|
||||||
Dim group_resto_cxp = resto_cxp.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
Dim group_resto_cxp = resto_cxp.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||||
.Texto = "Otros",
|
.Texto = "Otros",
|
||||||
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||||
|
|||||||
Reference in New Issue
Block a user