513 lines
35 KiB
Plaintext
513 lines
35 KiB
Plaintext
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="DashboardVentas.aspx.vb" Inherits="Ventas_DashboardVentas" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
|
<style>
|
|
.dataTables_scrollHead {
|
|
background-color: #95A5A6;
|
|
color: white;
|
|
}
|
|
|
|
.container {
|
|
width: 100%;
|
|
overflow-x: auto;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
#chartdiv {
|
|
width: 100%;
|
|
height: 500px;
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
|
Dashboard Ventas
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
|
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
|
<div class="portlet-title portlet-filterT smalltitle">
|
|
<div class="tools">
|
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
|
<a href="javascript:;" class="expand"></a>
|
|
</div>
|
|
<div class="titlefiltros caption">
|
|
<div class="row">
|
|
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
|
<div runat="server" id="DivProyecto" class="col-md-2">
|
|
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
|
</div>
|
|
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
|
<div runat="server" id="DivSubProyecto" class="col-md-2">
|
|
<asp:DropDownList ID="DdlSubProyecto" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:DropDownList>
|
|
</div>
|
|
<label class="col-md-1 ">Agrupador:</label>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList ID="DdlAgrupador" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
|
<asp:ListItem Text="Linea" Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="Cliente" Value="2"></asp:ListItem>
|
|
<asp:ListItem Text="Marca" Value="3"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body" style="display: none">
|
|
<div class="row">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<asp:GridView ID="GvVentas" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun dato"
|
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
|
data-sort="true" Width="100%" GridLines="None">
|
|
<Columns>
|
|
<asp:BoundField DataField="Mes" HeaderText="Mes" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="TotalAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalAno3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalAno3Presupuesto" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="CumplimientaRealVSPPTO" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PorcentajeUtilidad" HeaderText="% DE UTILIDAD" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PorcentajeContado" HeaderText="% CONTADO" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PorcentajeCredito" HeaderText="% CRÉDITO" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<asp:GridView ID="GvVentasAcumulado" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun dato"
|
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
|
data-sort="true" Width="100%" GridLines="None">
|
|
<Columns>
|
|
<asp:BoundField DataField="Mes" HeaderText="Mes" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="Ano3xAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="Ano3xAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="Ano3xPPTO" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</div>
|
|
<div class="row" id="DvGraficas" visible="true" runat="server">
|
|
<div id="DvGraVentas" runat="server" class="col-md-6 col-sm-6" style="width: 100%">
|
|
<!-- BEGIN REGIONAL STATS PORTLET-->
|
|
<div class="portlet light ">
|
|
<div class="portlet-title">
|
|
<div class="caption">
|
|
<i class="icon-graph font-red-sunglo"></i>
|
|
<span class="caption-subject font-red-sunglo bold uppercase">Grafica</span>
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
|
<a href="javascript:;" class="reload" data-original-title="" title=""></a>
|
|
<a href="javascript:;" class="remove" data-original-title="" title=""></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body">
|
|
<div id="chartdiv" style="text-align: center; height: 600px!important">
|
|
</div>
|
|
<div id="div_ventas" runat="server" style="text-align: center;">
|
|
<%--<img src="/Metronic/assets/admin/layout/img/loading.gif" alt="loading" />--%>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- END REGIONAL STATS PORTLET-->
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="container">
|
|
<asp:GridView ID="GvVentaReal" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun dato"
|
|
CssClass="table table-striped table-advance table-hover Widthall" OnRowDataBound="GvDatos_RowDataBound"
|
|
data-sort="true" Width="100%" GridLines="None">
|
|
<Columns>
|
|
<asp:BoundField DataField="Agrupador" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="PromTotalAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalAno3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalAno3Presupuesto" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalEneAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalFebAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalMarAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalAbrAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalMayAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalJunAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalJulAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalAgoAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalSepAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalOctAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalNovAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalDicAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalEneAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalFebAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalMarAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalAbrAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalMayAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalJunAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalJulAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalAgoAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalSepAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalOctAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalNovAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PromTotalDicAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<asp:GridView ID="GvVentasClasificacion" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun dato"
|
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
|
data-sort="true" Width="100%" GridLines="None">
|
|
<Columns>
|
|
<asp:BoundField DataField="Agrupador" HeaderText="Linea" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="TotalAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="PorcentajeVenta" HeaderText="% / T. VENTA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalAno2Presupuesto" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="Ano2xAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="Ano2xPPTO" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="container">
|
|
<%--<table class="table Widthall">
|
|
<tr>
|
|
<td style="width: 200px;"></td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Enero</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Febrero</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Marzo</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Abril</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Mayo</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Junio</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Julio</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Agosto</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Septiembre</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Octubre</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Noviembre</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Diciembre</td>
|
|
</tr>
|
|
</table>--%>
|
|
<asp:GridView ID="GvVentasClasificacionxMes" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun dato"
|
|
CssClass="table table-striped table-advance table-hover Widthall"
|
|
data-sort="true" Width="100%" GridLines="None">
|
|
<Columns>
|
|
<asp:BoundField DataField="Agrupador" HeaderText="Linea" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="TotalEneAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalEneAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalFebAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalFebAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalMarAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalMarAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalAbrAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalAbrAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalMayAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalMayAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalJunAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalJunAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalJulAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalJulAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalAgoAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalAgoAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalSepAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalSepAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalOctAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalOctAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalNovAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalNovAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalDicAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataField="TotalDicAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<%-- <div class="row">
|
|
<div class="col-md-12">
|
|
<div class="container">
|
|
<table class="table Widthall">
|
|
<tr>
|
|
<td style="width: 360px;"></td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Enero</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Febrero</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Marzo</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Abril</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Mayo</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Junio</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Julio</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Agosto</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Septiembre</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Octubre</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Noviembre</td>
|
|
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Diciembre</td>
|
|
</tr>
|
|
</table>
|
|
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun dato"
|
|
CssClass="table table-striped table-advance table-hover Widthall"
|
|
data-sort="true" Width="100%" GridLines="None">
|
|
<Columns>
|
|
<asp:BoundField DataField="Clasificacion" HeaderText="Linea" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="360px" />
|
|
<asp:BoundField DataField="TotalEneAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="360px" />
|
|
<asp:BoundField DataField="TotalEneAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalFebAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalFebAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalMarAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalMarAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalAbrAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalAbrAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalMayAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalMayAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalJunAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalJunAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalJulAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalJulAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalAgoAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalAgoAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalSepAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>
|
|
<asp:BoundField DataField="TotalSepAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalOctAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalOctAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalNovAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalNovAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalDicAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
<asp:BoundField DataField="TotalDicAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</div>--%>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</asp:Content>
|
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
|
<%-- <script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
|
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
|
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
|
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
|
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
|
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
|
|
|
<script>
|
|
|
|
function CargaGrafica(data) {
|
|
|
|
var chart = AmCharts.makeChart("chartdiv", {
|
|
"type": "serial",
|
|
"theme": "light",
|
|
"dataLoader": {
|
|
"url": "https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-160/SO-58530378.json",
|
|
"format": "json",
|
|
"complete": function (chart) {
|
|
//get potential valueFields after filtering out the categoryField
|
|
var valueFields = Object.keys(chart.dataProvider[0]).filter(function (value) {
|
|
return value !== chart.categoryField;
|
|
})
|
|
//create the graphs
|
|
valueFields.forEach(function (valueField) {
|
|
chart.graphs.push({
|
|
"valueField": valueField,
|
|
"title": valueField,
|
|
"type": "line",
|
|
"balloonText": "[[category]]: <b>[[value]]</b>",
|
|
"lineAlphas": 0.2
|
|
})
|
|
});
|
|
}
|
|
},
|
|
"valueAxes": [{
|
|
"gridColor": "#FFFFFF",
|
|
"gridAlpha": 0.2,
|
|
"dashLength": 0
|
|
}],
|
|
"gridAboveGraphs": true,
|
|
"startDuration": 1,
|
|
"graphs": [],
|
|
"chartCursor": {
|
|
"categoryBalloonEnabled": false,
|
|
"cursorAlpha": 0,
|
|
"zoomable": false
|
|
},
|
|
"categoryField": "Mes",
|
|
"categoryAxis": {
|
|
"gridPosition": "start",
|
|
"gridAlpha": 0
|
|
},
|
|
"legend": {},
|
|
"export": {
|
|
"enabled": true
|
|
},
|
|
"menu": [{
|
|
"class": "export-main",
|
|
"menu": ["PNG", "JPG", "CSV"]
|
|
}]
|
|
});
|
|
|
|
//var chart = AmCharts.makeChart("chartdiv", {
|
|
// "type": "serial",
|
|
// "theme": "light",
|
|
// "dataProvider": data,
|
|
// "startDuration": 2,
|
|
// "valueAxes": [{
|
|
// "position": "left",
|
|
// "title": "Ventas"
|
|
// }],
|
|
// "graphs": [{
|
|
// "balloonText": "[[category]]: <b>[[value]]</b>",
|
|
// "colorField": "Color",
|
|
// "fillAlphas": 1,
|
|
// "lineAlpha": 0.1,
|
|
// "type": "line",
|
|
// "valueField": "Valor"
|
|
// }],
|
|
// "depth3D": 20,
|
|
// "angle": 30,
|
|
// "chartCursor": {
|
|
// "categoryBalloonEnabled": false,
|
|
// "cursorAlpha": 0,
|
|
// "zoomable": false
|
|
// },
|
|
// "categoryField": "Texto",
|
|
// "categoryAxis": {
|
|
// "gridPosition": "start",
|
|
// "labelRotation": 90
|
|
// },
|
|
// "export": {
|
|
// "enabled": true
|
|
// }
|
|
//});
|
|
}--%>
|
|
|
|
|
|
<!--Librería principal de amCharts 4-->
|
|
<script src="https://cdn.amcharts.com/lib/4/core.js"></script>
|
|
|
|
<!-- Módulo de gráficos de XYChart -->
|
|
<script src="https://cdn.amcharts.com/lib/4/charts.js"></script>
|
|
|
|
<!-- Tema animado de amCharts 4 -->
|
|
<script src="https://cdn.amcharts.com/lib/4/themes/animated.js"></script>
|
|
|
|
<!-- Paquete de idioma español -->
|
|
<script src="https://cdn.amcharts.com/lib/4/lang/es_ES.js"></script>
|
|
|
|
<script>
|
|
|
|
// Función para crear series dinámicamente
|
|
function createSeries(field, name) {
|
|
var series = chart.series.push(new am4charts.LineSeries());
|
|
series.dataFields.valueY = field;
|
|
series.dataFields.categoryX = "mes";
|
|
series.name = name;
|
|
series.strokeWidth = 2;
|
|
|
|
// Añadir bullets a la serie
|
|
var bullet = series.bullets.push(new am4charts.CircleBullet());
|
|
bullet.circle.radius = 4;
|
|
bullet.circle.fill = am4core.color("#fff");
|
|
bullet.circle.strokeWidth = 2;
|
|
|
|
// Configurar el tooltip para cada serie
|
|
series.tooltipText = "{name}: [bold]{valueY}[/]";
|
|
series.tooltip.pointerOrientation = "vertical";
|
|
series.tooltip.background.cornerRadius = 5;
|
|
series.tooltip.background.fillOpacity = 0.8;
|
|
series.tooltip.label.padding(10, 10, 10, 10);
|
|
|
|
// Asegurar que el label del tooltip sea visible
|
|
series.tooltip.label.fill = am4core.color("#000"); // Texto en negro
|
|
|
|
// Mostrar el tooltip solo al pasar el cursor sobre la serie
|
|
series.tooltip.showInViewport = false;
|
|
|
|
// Habilitar interacciones en la serie
|
|
series.interactionsEnabled = true;
|
|
}
|
|
|
|
|
|
function generaGrafico(dtGrafico, dtseries) {
|
|
|
|
// Importar las librerías de amCharts
|
|
am4core.useTheme(am4themes_animated);
|
|
|
|
// Crear el gráfico
|
|
var chart = am4core.create("chartdiv", am4charts.XYChart);
|
|
|
|
// Ejemplo de datos dinámicos
|
|
chart.data = dtGrafico; //[
|
|
|
|
var categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());
|
|
categoryAxis.dataFields.category = "mes";
|
|
categoryAxis.renderer.grid.template.location = 0;
|
|
categoryAxis.renderer.minGridDistance = 30;
|
|
|
|
// Configuración del eje Y (Importe)
|
|
var valueAxis = chart.yAxes.push(new am4charts.ValueAxis());
|
|
valueAxis.title.text = "Importe";
|
|
|
|
for (var i = 0; i < dtseries.length; i++) {
|
|
var item = dtseries[i];
|
|
var key = Object.keys(item)[0];
|
|
var value = item[key];
|
|
|
|
var series = chart.series.push(new am4charts.LineSeries());
|
|
series.dataFields.valueY = key;
|
|
series.dataFields.categoryX = "mes";
|
|
series.name = value;
|
|
series.strokeWidth = 2;
|
|
|
|
// Añadir bullets a la serie
|
|
var bullet = series.bullets.push(new am4charts.CircleBullet());
|
|
bullet.circle.radius = 4;
|
|
bullet.circle.fill = am4core.color("#fff");
|
|
bullet.circle.strokeWidth = 2;
|
|
|
|
// Configurar el tooltip para cada serie
|
|
series.tooltipText = "{name}: [bold]{valueY}[/]";// "{" + value + "}: [bold]{" + key +"}[/]";
|
|
series.tooltip.pointerOrientation = "vertical";
|
|
series.tooltip.background.cornerRadius = 5;
|
|
series.tooltip.background.fillOpacity = 0.8;
|
|
series.tooltip.label.padding(10, 10, 10, 10);
|
|
|
|
// Asegurar que el label del tooltip sea visible
|
|
series.tooltip.label.fill = am4core.color("#000"); // Texto en negro
|
|
|
|
// Mostrar el tooltip solo al pasar el cursor sobre la serie
|
|
series.tooltip.showInViewport = false;
|
|
|
|
// Habilitar interacciones en la serie
|
|
series.interactionsEnabled = true;
|
|
|
|
|
|
}
|
|
|
|
// Habilitar el cursor pero deshabilitar su tooltip
|
|
chart.cursor = new am4charts.XYCursor();
|
|
chart.cursor.behavior = "none"; // Deshabilitar pan o zoom
|
|
chart.cursor.lineX.disabled = true;
|
|
chart.cursor.lineY.disabled = true;
|
|
chart.cursor.tooltipEnabled = false; // Deshabilitar el tooltip del cursor
|
|
|
|
// Leyenda
|
|
chart.legend = new am4charts.Legend();
|
|
|
|
// Exportar el gráfico
|
|
chart.exporting.menu = new am4core.ExportMenu();
|
|
}
|
|
|
|
</script>
|
|
</asp:Content>
|