Exemple #1
0
        private void PieCharts(DataTable dt)
        {
            ReadingPiePercents pieMorn = new ReadingPiePercents(dt, new DateTime(1, 1, 1, GetUserTimeSettings().Morning, 0, 0), new DateTime(1, 1, 1, GetUserTimeSettings().Afternoon, 0, 0).AddMilliseconds(-1));

            chtMornings.Series["Mornings_Series"].XValueMember                   = "Label";
            chtMornings.Series["Mornings_Series"].YValueMembers                  = "Value";
            chtMornings.Series["Mornings_Series"].IsValueShownAsLabel            = false;
            chtMornings.ChartAreas["Mornings_ChartArea"].Area3DStyle.Enable3D    = true;
            chtMornings.ChartAreas["Mornings_ChartArea"].Area3DStyle.Inclination = 50;
            chtMornings.DataSource = pieMorn.BindingSource;
            chtMornings.DataBind();

            ReadingPiePercents pieAfter = new ReadingPiePercents(dt, new DateTime(1, 1, 1, GetUserTimeSettings().Afternoon, 0, 0), new DateTime(1, 1, 1, GetUserTimeSettings().Night, 0, 0).AddMilliseconds(-1));

            chtAfternoons.Series["Afternoons_Series"].XValueMember                   = "Label";
            chtAfternoons.Series["Afternoons_Series"].YValueMembers                  = "Value";
            chtAfternoons.Series["Afternoons_Series"].IsValueShownAsLabel            = false;
            chtAfternoons.ChartAreas["Afternoons_ChartArea"].Area3DStyle.Enable3D    = true;
            chtAfternoons.ChartAreas["Afternoons_ChartArea"].Area3DStyle.Inclination = 50;
            chtAfternoons.DataSource = pieAfter.BindingSource;
            chtAfternoons.DataBind();

            ReadingPiePercents pieNight = new ReadingPiePercents(dt, new DateTime(1, 1, 1, GetUserTimeSettings().Night, 0, 0), new DateTime(1, 1, 1, GetUserTimeSettings().Morning, 0, 0).AddMilliseconds(-1));

            chtNights.Series["Nights_Series"].XValueMember                   = "Label";
            chtNights.Series["Nights_Series"].YValueMembers                  = "Value";
            chtNights.Series["Nights_Series"].IsValueShownAsLabel            = false;
            chtNights.ChartAreas["Nights_ChartArea"].Area3DStyle.Enable3D    = true;
            chtNights.ChartAreas["Nights_ChartArea"].Area3DStyle.Inclination = 50;
            chtNights.DataSource = pieNight.BindingSource;
            chtNights.DataBind();
        }
Exemple #2
0
        private void PieCharts(DataTable dt)
        {
            ReadingPiePercents pieMorn = new ReadingPiePercents(dt, new DateTime(1, 1, 1, GetUserTimeSettings().Morning, 0, 0), new DateTime(1, 1, 1, GetUserTimeSettings().Afternoon, 0, 0).AddMilliseconds(-1));
            chtMornings.Series["Mornings_Series"].XValueMember = "Label";
            chtMornings.Series["Mornings_Series"].YValueMembers = "Value";
            chtMornings.Series["Mornings_Series"].IsValueShownAsLabel = false;
            chtMornings.ChartAreas["Mornings_ChartArea"].Area3DStyle.Enable3D = true;
            chtMornings.ChartAreas["Mornings_ChartArea"].Area3DStyle.Inclination = 50;
            chtMornings.DataSource = pieMorn.BindingSource;
            chtMornings.DataBind();

            ReadingPiePercents pieAfter = new ReadingPiePercents(dt, new DateTime(1, 1, 1, GetUserTimeSettings().Afternoon, 0, 0), new DateTime(1, 1, 1, GetUserTimeSettings().Night, 0, 0).AddMilliseconds(-1));
            chtAfternoons.Series["Afternoons_Series"].XValueMember = "Label";
            chtAfternoons.Series["Afternoons_Series"].YValueMembers = "Value";
            chtAfternoons.Series["Afternoons_Series"].IsValueShownAsLabel = false;
            chtAfternoons.ChartAreas["Afternoons_ChartArea"].Area3DStyle.Enable3D = true;
            chtAfternoons.ChartAreas["Afternoons_ChartArea"].Area3DStyle.Inclination = 50;
            chtAfternoons.DataSource = pieAfter.BindingSource;
            chtAfternoons.DataBind();

            ReadingPiePercents pieNight = new ReadingPiePercents(dt, new DateTime(1, 1, 1, GetUserTimeSettings().Night, 0, 0), new DateTime(1, 1, 1, GetUserTimeSettings().Morning, 0, 0).AddMilliseconds(-1));
            chtNights.Series["Nights_Series"].XValueMember = "Label";
            chtNights.Series["Nights_Series"].YValueMembers = "Value";
            chtNights.Series["Nights_Series"].IsValueShownAsLabel = false;
            chtNights.ChartAreas["Nights_ChartArea"].Area3DStyle.Enable3D = true;
            chtNights.ChartAreas["Nights_ChartArea"].Area3DStyle.Inclination = 50;
            chtNights.DataSource = pieNight.BindingSource;
            chtNights.DataBind();
        }