Esempio n. 1
0
        //6/2/2016 NS added for VSPLUS-3011
        private void SetGraphForMostActiveCommunity()
        {
            MostActiveCommunityChart.Series.Clear();
            ChartTitle title = new ChartTitle();

            title.Text = "Most Active Community";
            System.Drawing.Font font = new System.Drawing.Font(title.Font.FontFamily.Name, 12);
            title.Font = font;
            MostActiveCommunityChart.Titles.Clear();
            MostActiveCommunityChart.Titles.Add(title);
            MostActiveCommunityChart.DataBind();
            DataTable dt = VSWebBL.DashboardBL.ConnectionsBL.Ins.GetMostActiveCommunity(selectedServer);

            if (dt.Rows.Count > 0)
            {
                Series series = new Series("Type", ViewType.Doughnut);

                series.ArgumentDataMember = dt.Columns["Type"].ToString();
                series.LabelsVisibility   = DevExpress.Utils.DefaultBoolean.True;
                DoughnutSeriesLabel label = (DoughnutSeriesLabel)series.Label;
                label.TextPattern        = "{A}: {VP:P0}";
                series.LegendTextPattern = "{A}: {V}";

                ValueDataMemberCollection seriesValueDataMembers = (ValueDataMemberCollection)series.ValueDataMembers;
                seriesValueDataMembers.AddRange(dt.Columns["Total"].ToString());
                MostActiveCommunityChart.Series.Add(series);

                title.Text = "Most Active Community is \"" + dt.Rows[0]["Name"].ToString() + "\"";

                MostActiveCommunityChart.Titles.Clear();
                MostActiveCommunityChart.Titles.Add(title);
                MostActiveCommunityChart.DataSource = dt;
                MostActiveCommunityChart.DataBind();
            }
        }
Esempio n. 2
0
        public DataTable SetGraphForPictures()
        {
            PicturesWebChart.Series.Clear();
            DataTable dt     = VSWebBL.DashboardBL.ConnectionsBL.Ins.GetProfileStats("NUM_OF_PROFILES_WITH_NO_PICTURE", "NUM_OF_PROFILES_PROFILES", selectedServer, "No Picture", "Picture", false);
            Series    series = new Series("StatName", ViewType.Doughnut);

            series.ArgumentDataMember = dt.Columns["StatName"].ToString();
            series.LabelsVisibility   = DevExpress.Utils.DefaultBoolean.True;
            DoughnutSeriesLabel label = (DoughnutSeriesLabel)series.Label;

            label.TextPattern        = "{A}: {VP:P0}";
            series.LegendTextPattern = "{A}: {V}";

            ValueDataMemberCollection seriesValueDataMembers = (ValueDataMemberCollection)series.ValueDataMembers;

            seriesValueDataMembers.AddRange(dt.Columns["StatValue"].ToString());
            PicturesWebChart.Series.Add(series);

            PicturesWebChart.DataSource = dt;
            PicturesWebChart.DataBind();
            return(dt);
        }