Anexo de Catálogo Centro Costo ordenar grafica por valor, Movimientos Auxiliares del Catálogo enviar tipo movimiento

This commit is contained in:
rakcsle
2025-02-15 10:09:46 -07:00
parent e55ee74443
commit 46706f2687
4 changed files with 23 additions and 9 deletions

View File

@@ -359,7 +359,13 @@
let currentid = 1;
function HandlerGraf(obj, evt) {
$("#DivModalGrafica").modal();
cdatos = $(obj).data('values');
//cdatos = $(obj).data('values');
cdatos = $(obj).data('values').sort(function (a, b) {
return b.Valor - a.Valor;
});
if (currentid == 1) {
CargaGraficaBarras();
} else {
@@ -369,6 +375,9 @@
}
function CargaGraficaBarras() {
let data = cdatos;
//let data = cdatos.sort(function (a, b) {
// return b.Valor - a.Valor;
//});
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "light",
@@ -406,6 +415,11 @@
function CargaGraficaPastel() {
let data = cdatos;
//let data = cdatos.sort(function (a, b) {
// return b.Valor - a.Valor;
//});
var chart = AmCharts.makeChart("chartdiv", {
"type": "pie",
"theme": "light",