Dashboard ventas
This commit is contained in:
352
Ventas/DashboardVentas.aspx
Normal file
352
Ventas/DashboardVentas.aspx
Normal file
@@ -0,0 +1,352 @@
|
||||
<%@ 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="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-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
|
||||
// }
|
||||
//});
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
Reference in New Issue
Block a user