Ejemplo n.º 1
0
        private void TTLChart()
        {
            var da = ent.Air_DB_GetTTL(null);

            Libero.FusionCharts.Pie3DChart pie = new Pie3DChart();

            // Set properties
            pie.Background.BgColor           = "ffffff";
            pie.ChartTitles.Caption          = "TTL Status";
            pie.PiePropertySet.PieSliceDepth = 15;
            //pie.PieVisibility.Animation = false;
            pie.NumberFormat.DecimalPrecision = 0;
            // Set a template
            pie.Template = new Libero.FusionCharts.Template.OfficeDarkTemplate();
            pie.GenericVisibility.ShowNames = true;


            DataTable dt = new DataTable();

            dt.Columns.Add("RemainDays");
            dt.Columns.Add("Count");


            foreach (var item in da)
            {
                dt.Rows.Add(new object[] { item.RemainDays + " Days", item.Count, });
            }
            pie.DataSource     = dt;
            pie.DataTextField  = "RemainDays";
            pie.DataValueField = "Count";
            pie.DataBind();


            ViewData["TTLChart"] = pie;
        }
Ejemplo n.º 2
0
        private void TicketStatus()
        {
            DateTime fromdate = (DateTime)Session["DBFromDate"];
            DateTime toDate   = (DateTime)Session["DBToDate"];
            var      da       = ent.Air_DB_GetTicketStatus(fromdate, toDate, null);

            Libero.FusionCharts.Pie3DChart pie = new Pie3DChart();

            // Set properties
            pie.Background.BgColor           = "ffffff";
            pie.ChartTitles.Caption          = "Ticket Status";
            pie.ChartTitles.SubCaption       = fromdate.ToString(System.Web.Configuration.WebConfigurationManager.AppSettings["DateFormat"]) + " - " + toDate.ToString(System.Web.Configuration.WebConfigurationManager.AppSettings["DateFormat"]);
            pie.PiePropertySet.PieSliceDepth = 15;
            //pie.PieVisibility.Animation = false;

            // Set a template
            pie.Template = new Libero.FusionCharts.Template.OfficeDarkTemplate();
            pie.GenericVisibility.ShowNames = true;


            DataTable dt = new DataTable();

            dt.Columns.Add("Name");
            dt.Columns.Add("Count");

            foreach (var item in da)
            {
                dt.Rows.Add(new object[] { item.ticketStatusName, item.Count });
            }
            pie.DataSource     = dt;
            pie.DataTextField  = "Name";
            pie.DataValueField = "Count";
            pie.DataBind();
            ViewData["TicketStatusChart"] = pie;
        }