Ejemplo n.º 1
0
        private void Init()
        {
            ChartArea chartArea = new ChartArea();
            Legend legend = new Legend();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();

            chartArea.Name = "ChartArea1";
            this.ChartAreas.Add(chartArea);
            legend.Name = "Legend1";
            this.Legends.Add(legend);

            Series.Clear();
            m_series = new Series
            {
                Name = "Series1",
                Color = System.Drawing.Color.Green,
                IsVisibleInLegend = false,
                IsXValueIndexed = true,
                ChartType = SeriesChartType.Line
            };
            Series.Add(m_series);

            for (int i = 10; i < 23; i++)
            {
                m_series.Points.AddXY(i, f(i));
            }
        }
Ejemplo n.º 2
0
        private void GenerateChart(SeriesCreator creator, string filePath)
        {
            IEnumerable<Series> serieses = creator.ToSerieses();

            using (var ch = new Chart())
            {
                ch.Size = new Size(1300, 800);
                ch.AntiAliasing = AntiAliasingStyles.All;
                ch.TextAntiAliasingQuality = TextAntiAliasingQuality.High;
                ch.Palette = ChartColorPalette.BrightPastel;

                ChartArea area = new ChartArea();
                area.AxisX.MajorGrid.Enabled = false;
                area.AxisY.MajorGrid.Enabled = false;
                area.AxisY.Minimum = creator.GetMinimumY();
                ch.ChartAreas.Add(area);

                Legend legend = new Legend();
                legend.Font = new Font("Microsoft Sans Serif", 12, FontStyle.Regular);
                ch.Legends.Add(legend);

                foreach (var s in serieses)
                {
                    ch.Series.Add(s);
                }

                string savePath = filePath + ".png";
                ch.SaveImage(savePath, ChartImageFormat.Png);
            }
        }
        public PrettyChart()
        {
            var title1 = new Title {Name = "Title1", Text = "<TITLE>"};
            Titles.Add(title1);

            var area = new ChartArea();
            area.AxisY.LabelStyle.Enabled = true;
            area.AxisY.Interval = 1.0;
            area.AxisX.LabelStyle.Enabled = true;
            area.Name = "ChartArea2";

            var legend1 = new Legend {Alignment = StringAlignment.Center, Docking = Docking.Top, Name = "Legend1"};
            Legends.Add(legend1);

            var series2 = new Series
                              {
                                  ChartArea = "ChartArea2",
                                  Color = Color.Blue,
                                  Legend = "Legend1",
                                  Name = "Series2",
                                  XValueType = ChartValueType.Int32
                              };

            ChartAreas.Add(area);
            Series.Add(series2);
            Dock = DockStyle.Fill;
            Location = new Point(0, 0);

            Titles[0].Text = "Age Distribution";
            Series[0].Name = "Number of People";
        }
Ejemplo n.º 4
0
        public Form1()
        {
            InitializeComponent();
            creationBox.BringToFront();
            initLegend = chart1.Legends[0];

            this.Text = "Assistant aux QCMs - ";

            restart.Visible = false;

            toolTip.SetToolTip(saveChart, "Cliquer pour sauvegarder en image");
            saveChart.Visible = false;
            toolTip.SetToolTip(zoomChart, "Cliquer pour mettre en plein écran");
            zoomChart.Visible = false;
            toolTip.SetToolTip(showLegend, "Cliquer pour cacher/montrer la légende");
            showLegend.Visible = false;

            notes.Visible = false;
            notesBox.Visible = false;

            date.Text = "";
            currentPage = 1;
            labels = new Label[] { label1, label2, label3, label4, label5 };
            checkedList = new CheckedListBox[] { checkedListBox1, checkedListBox2, checkedListBox3, checkedListBox4, checkedListBox5 };
            for (int i = 0; i < 5; i++)
            {
                checkedList[i].Items.Clear();
                checkedList[i].Items.Add("Pas du tout d'accord");
                checkedList[i].Items.Add("Pas d'accord");
                checkedList[i].Items.Add("D'accord");
                checkedList[i].Items.Add("Tout à fait d'accord");
            }

            chart1.Visible = false;
        }
        /* Adds one tab containing a chart to this.progressTabControl for each member in chartName.
         * Returns a list of the added charts.
         */
        private List<Chart> AddChartsToProgressControl(List<string> chartNames)
        {
            int i = 0;
            List<Chart> charts = new List<Chart>();

            foreach (string chartName in chartNames)
            {
                Legend legend = new Legend();
                legend.Name = "legend";
                legend.Docking = Docking.Right;

                ChartArea ca = new ChartArea();
                ca.Name = "chartArea";

                Chart chart = new Chart();
                chart.Legends.Add(legend);
                chart.ChartAreas.Add(ca);
                chart.Name = chartName;
                chart.Dock = DockStyle.Fill;
                chart.Text = chartName;

                TabPage tPage = new TabPage();
                tPage.Name = chartName;
                tPage.Text = chartName;
                tPage.Controls.Add(chart);

                this.progressTabControl.Controls.Add(tPage);

                charts.Add(chart);

                i++;
            }
            return charts;
        }
Ejemplo n.º 6
0
        private Chart CreatePieChart(Legend legend, Title title, Dictionary<string, int> dpc)
        {
            var chart = new Chart();
            chart.Size = new Size(600, 450);
            chart.Titles.Add(title);
            var chartArea = new ChartArea();

            chart.ChartAreas.Add(chartArea);

            var series = new Series();
            series.Name = "series";
            series.ChartType = SeriesChartType.Pie;

            //chart.Legends.Add(legend);
            chart.Series.Add(series);

            foreach (var entry in dpc)
            {
                if(entry.Value > 0)
                    chart.Series["series"].Points.AddXY(entry.Key, entry.Value);
            }

            chart.Dock = DockStyle.Fill;
            return chart;
        }
        public void InitializeChart()
        {
            this.components = new System.ComponentModel.Container();
            ChartArea chartArea1 = new ChartArea();
            Legend legend1 = new Legend() { BackColor = Color.Green, ForeColor = Color.Black, Title = "Salary" };
            Legend legend2 = new Legend() { BackColor = Color.Green, ForeColor = Color.Black, Title = "Salary" };
            barChart = new Chart();

            ((ISupportInitialize)(barChart)).BeginInit();

            SuspendLayout();
            //====Bar Chart
            chartArea1 = new ChartArea();
            chartArea1.Name = "BarChartArea";
            barChart.ChartAreas.Add(chartArea1);
            barChart.Dock = System.Windows.Forms.DockStyle.Fill;
            legend2.Name = "Legend3";
            barChart.Legends.Add(legend2);

            AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            //this.ClientSize = new System.Drawing.Size(284, 262);
            this.Load += new EventHandler(Form3_Load);
            ((ISupportInitialize)(this.barChart)).EndInit();
            this.ResumeLayout(false);
        }
Ejemplo n.º 8
0
        public override void graphView()
        {
            //MessageBox.Show("ypDayo");

            base.chartClear();
            base.graphView();

            

            ChartArea area = new ChartArea("area1");
            
            area.AxisX.Title = "月";
            area.AxisX.TitleFont = new Font("@MS ゴシック", 10, FontStyle.Bold);

            area.AxisY.Title = "金額";
            area.AxisY.TitleFont = new Font("@MS ゴシック", 10, FontStyle.Bold);
            area.AxisY.TitleAlignment = StringAlignment.Far;
            area.AxisY.TextOrientation = TextOrientation.Stacked;

            graph.Titles.Add(date.Year + "年");

            area.AxisX.MajorGrid.Enabled = false;
            area.AxisY.MajorGrid.Enabled = false;
            graph.ChartAreas.Add(area);

            Legend leg = new Legend(date.Year.ToString());
            leg.Alignment = StringAlignment.Near;
            leg.DockedToChartArea = "area1";
            
            //一つ目
            setSeries(date.Year);
            //比較用
            dateCombo.Text = string.IsNullOrWhiteSpace(dateCombo.Text) ? "未選択" : dateCombo.Text;
            if (dateCombo.Text != "未選択")
            {
                
                
                string select = dateCombo.SelectedItem.ToString();

                setSeries(int.Parse(select));
                dateCombo.SelectedIndexChanged -= DateCombo_SelectedIndexChanged;
                dateCombo.Text = select;
                
            }
            


            area.AxisY.Maximum = double.NaN;

            area.AxisX.Maximum = 12;
            area.AxisX.Minimum = 0;
            area.AxisX.Interval = 1;

            double max = area.AxisY.Maximum;

            area.AxisY.Interval = max / 10;
        }
Ejemplo n.º 9
0
        private static void CreatePlotAndSave(TestItem testItem)
        {
            // Create a Chart
            var chart = new Chart();

            // Chart title
            var chartTitle = new Title(testItem.Label);
            chart.Titles.Add(chartTitle);

            // Create Chart Area
            ChartArea chartArea = new ChartArea();
            chartArea.AxisX.Title = "Milestone title";
            chartArea.AxisY.Title = "ms";
            chartArea.AxisX.IsMarginVisible = false;

            for (int i = 0; i < testItem.MilestoneLabels.Length;i++)
            {
                chartArea.AxisX.CustomLabels.Add(i + 0.5, i + 1.5, testItem.MilestoneLabels[i]);
            }

            // Legend
            Legend legend = new Legend("default");
            legend.Docking = Docking.Bottom;
            chart.Legends.Add(legend);

            // Add Chart Area to the Chart
            chart.ChartAreas.Add(chartArea);

            foreach (var line in testItem.Lines)
            {
                Series series = new Series();
                series.Legend = "default";
                series.LegendText = line.Label;
                series.ChartType = SeriesChartType.Line;
                series.MarkerStyle = MarkerStyle.Circle;
                series.BorderWidth = 2;
                series.MarkerSize = 5;
                for (int i = 0; i < line.Points.Length; i++)
                {
                    series.Points.Add(line.Points[i].GetMinTime());
                }
                chart.Series.Add(series);
            }

            // Set chart control location
            chart.Location = new System.Drawing.Point(16, 48);

            // Set Chart control size
            chart.Size = new System.Drawing.Size(400, 300);
            var fileName = GenerateFileName(testItem);
            var file = new FileStream(fileName, FileMode.Create);
            chart.SaveImage(file, ChartImageFormat.Png);
            file.Close();

            Console.WriteLine(String.Format("Report: \"{0}\" created.", fileName));
        }
Ejemplo n.º 10
0
 private void AddLegend(Chart chart)
 {
     var legend = new Legend
     {
         Docking = Docking.Right,
         Alignment = StringAlignment.Center,
         Font = new Font("Arial", 7f),
     };
     chart.Legends.Add(legend);
 }
Ejemplo n.º 11
0
        public static void AddLegend(Chart chart, LegendStyle style)
        {
            var legend = new Legend();
            legend.Enabled = true;
            legend.LegendStyle = style;
            legend.Name = "MyLegend";
            legend.Position.Auto = true;

            chart.Legends.Add(legend);
        }
Ejemplo n.º 12
0
        private void BuildChartPie()
        {
            ChartArea chartArea1 = new ChartArea();
            chartArea1.Area3DStyle.IsClustered = true;
            chartArea1.Area3DStyle.IsRightAngleAxes = false;
            chartArea1.Area3DStyle.Perspective = 10;
            chartArea1.Area3DStyle.PointGapDepth = 0;
            chartArea1.Area3DStyle.Rotation = 0;
            chartArea1.Area3DStyle.WallWidth = 0;
            chartArea1.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
            chartArea1.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
            chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
            chartArea1.AxisY.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
            chartArea1.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
            chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
            chartArea1.BackColor = System.Drawing.Color.Transparent;
            chartArea1.BackSecondaryColor = System.Drawing.Color.Transparent;
            chartArea1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
            chartArea1.BorderWidth = 0;
            chartArea1.Name = "Default";
            chartArea1.ShadowColor = System.Drawing.Color.Transparent;
            this.chartPie.ChartAreas.Add(chartArea1);

            Legend legend1 = new Legend();
            legend1.Alignment = System.Drawing.StringAlignment.Center;
            legend1.BackColor = System.Drawing.Color.Transparent;
            legend1.Docking = Docking.Bottom;
            legend1.Enabled = true;
            legend1.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
            legend1.IsTextAutoFit = true;
            legend1.Name = "Default";
            this.chartPie.Legends.Add(legend1);

            Title title1 = new Title();
            title1.Font = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Bold);
            title1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
            title1.Name = "Title";
            title1.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            title1.ShadowOffset = 3;
            title1.Text = "销量前十的产品统计饼图";
            this.chartPie.Titles.Add(title1);

            Series series1 = new Series();
            series1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
            series1.ChartArea = "Default";
            series1["PieLabelStyle"] = "Outside";
            series1["PieDrawingStyle"] = "Concave";
            series1.ChartType = SeriesChartType.Pie;
            series1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(65)))), ((int)(((byte)(140)))), ((int)(((byte)(240)))));
            series1.Legend = "Default";
            series1.Name = "Default";
            this.chartPie.Series.Add(series1);
        }
        private void GenerarReporte(List<Cita> list_citas, DateTime desde, DateTime hasta)
        {
            int i = 0; int j = 1; int iguales = 0;
            this.chtGrafico.Titles.Clear();
            this.chtGrafico.Legends.Clear();
            this.chtGrafico.Series.Clear();
            this.chtGrafico.Titles.Add(" Reportes Pacientes Atendidos - Generado el día: " + DateTime.Now + " " + System.Environment.NewLine + " " + System.Environment.NewLine + "Desde el día " + desde + " hasta el día " + hasta);
            ArrayList list_iguales = new ArrayList();
            foreach (Cita cita in list_citas)
            {
                this.list_fechas.Add(cita.Fecha);
            }
            SortedSet<DateTime> set = new SortedSet<DateTime>(list_fechas);

            foreach (DateTime val in set)
            {
                iguales = 0;
                foreach (Cita cita in list_citas)
                {
                    if (cita.Fecha == val)
                    {
                        ++iguales;
                    }
                }
                list_iguales.Add(iguales);
            }
            
            int x = list_fechas.Count;
            int y = set.Count;
            foreach (DateTime val in set)
            {
                Series serie = new Series();
                Legend legend = new Legend();
                serie.Legend = val.ToString();
                legend.Name = "Hora-" + val;
                legend.Title = "Horas de Atención";
                this.chtGrafico.Legends.Add(legend);
                this.chtGrafico.Series.Add(val.ToString());
                this.chtGrafico.Series[i].Points.AddXY(j,list_iguales[i]);
                this.chtGrafico.Series[i].ChartType = SeriesChartType.Bar;
                this.chtGrafico.Series[i]["PointWidth"] = "0.6";
                this.chtGrafico.Series[i].IsValueShownAsLabel = true;
                this.chtGrafico.Series[i]["BarLabelStyle"] = "Center";
                this.chtGrafico.Series[i]["DrawingStyle"] = "Emboss";
                ++i;++j;
            }
            chtGrafico.Update();
            chtGrafico.UpdateAnnotations();
            MessageBox.Show("Registro total de pacientes atendidos: " + list_citas.Count + "." + " " + System.Environment.NewLine + " " + System.Environment.NewLine + "Desde el día " + desde + " hasta el día " + hasta, "SFH Administración de Reportes y Estadísticas - Reportes de Pacientes", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Ejemplo n.º 14
0
        public Bitmap Show_MSChart()
        {
            try
            {
                if (!Check_Chart())
                    return null;

                ChartArea chartArea = new ChartArea("chartArea");
                Grid grid = new Grid();
                grid.LineDashStyle = ChartDashStyle.Solid;
                grid.LineColor = Color.Black;

                Legend lengend = new Legend();
                lengend.Docking = Docking.Right;

                chartArea.AxisX.MajorGrid = grid;
                chartArea.AxisY.MajorGrid = grid;
                chartArea.AxisX.Interval = 1;
                chartArea.AxisX.IsLabelAutoFit = false;
                chartArea.BackColor = Color.FromArgb(0xEF, 0xEF, 0xEF);

                Series series = new Series("危险度");
                series.ChartType = SeriesChartType.Column;
                //series.IsValueShownAsLabel = true;
                series.Color = dataColor;
                series.BorderWidth = 0;

                SmartLabelStyle smartLabelStyle = new SmartLabelStyle();
                smartLabelStyle.AllowOutsidePlotArea = LabelOutsidePlotAreaStyle.Yes;
                series.SmartLabelStyle = smartLabelStyle;

                series.Points.DataBindXY(dataTable.DefaultView, dataX, dataTable.DefaultView, dataY);
                Chart chart = new Chart();
                chart.Width = width;
                chart.Height = height;
                chart.ChartAreas.Add(chartArea);
                chart.Series.Add(series);
                chart.Legends.Add(lengend);

                MemoryStream memoryStream = new MemoryStream();
                chart.SaveImage(memoryStream, ChartImageFormat.Jpeg);

                Bitmap bitmap = new Bitmap(memoryStream);
                return bitmap;
            }
            catch (Exception ex)
            {
                return null;
            }
        }
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
            System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
            this.MonitorGrap = new System.Windows.Forms.DataVisualization.Charting.Chart();
            this.btnClose = new System.Windows.Forms.Button();
            ((System.ComponentModel.ISupportInitialize)(this.MonitorGrap)).BeginInit();
            this.SuspendLayout();
            // 
            // MonitorGrap
            // 
            this.MonitorGrap.BorderlineColor = System.Drawing.Color.Black;
            this.MonitorGrap.BorderlineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
            chartArea1.Name = "ChartArea1";
            this.MonitorGrap.ChartAreas.Add(chartArea1);
            legend1.Name = "Legend1";
            this.MonitorGrap.Legends.Add(legend1);
            this.MonitorGrap.Location = new System.Drawing.Point(12, 11);
            this.MonitorGrap.Name = "MonitorGrap";
            this.MonitorGrap.Size = new System.Drawing.Size(837, 280);
            this.MonitorGrap.TabIndex = 0;
            this.MonitorGrap.Text = "chart1";
            // 
            // btnClose
            // 
            this.btnClose.Location = new System.Drawing.Point(774, 298);
            this.btnClose.Name = "btnClose";
            this.btnClose.Size = new System.Drawing.Size(75, 28);
            this.btnClose.TabIndex = 1;
            this.btnClose.Tag = "Common_Close";
            this.btnClose.Text = "Close";
            this.btnClose.UseVisualStyleBackColor = true;
            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
            // 
            // FrmServerMonitor
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.White;
            this.ClientSize = new System.Drawing.Size(880, 339);
            this.Controls.Add(this.btnClose);
            this.Controls.Add(this.MonitorGrap);
            this.Name = "FrmServerMonitor";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            this.Text = "ServerMonitor";
            this.Load += new System.EventHandler(this.frmServerMonitor_Load);
            ((System.ComponentModel.ISupportInitialize)(this.MonitorGrap)).EndInit();
            this.ResumeLayout(false);

        }
        private void GenerarReporte(List<Cita> list_citas)
        {
           
            this.chtGrafico.Titles.Add(" Reportes Pacientes  " + DateTime.Now);
            //this.chtGrafico.ChartAreas[0].Area3DStyle.Enable3D = true;
            int i = 0;
            int j = 1;
            foreach (Cita cita in list_citas){

                this.list_fechas.Add(cita.Fecha.ToString());
            }

            int[] pointsArray = { Convert.ToInt32(1), Convert.ToInt32(3), Convert.ToInt32(1) };
            
            SortedSet<string> set = new SortedSet<string>(list_fechas);
            int x = list_fechas.Count;
            int y = set.Count;
           // this.chtGrafico.Series[0].Points.AddXY(x, y);

           
            foreach (string val in set)
            {
                Series serie = new Series();
                Legend legend = new Legend();
                serie.Legend = val;
                legend.Name = "Hora-" + val;
                legend.Title = "Horas de atencion";
                this.chtGrafico.Legends.Add(legend);
                serie = this.chtGrafico.Series.Add(val);
                //serie.Points.Add(pointsArray[i]);
                serie.Points.AddXY(j,pointsArray[i]);
                
                
                //this.chtGrafico.Series.Add(serie);
               
                
                
                //this.chtGrafico.Series[i].Points.AddXY(x, y);
                /*
                Series series = this.chtGrafico.Series.Add(val);
                series.Points.Add(pointsArray[i]);
                ++i;*/
              // this.chtGrafico.Series[i].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Range;
                ++i; ++j;
                chtGrafico.Update();
            }
         
           
        }
        private void Graphique_Load(object sender, EventArgs e)
        {
            chart1.Dock = DockStyle.Fill;
            chart1.Palette = ChartColorPalette.SeaGreen;
            chart1.Titles.Add("Title1");
            chart1.Titles["Title1"].Text = "Graphique";

            ChartArea chartarea = new ChartArea();
            chartarea.Name = "NewChartArea";
            chart1.ChartAreas.Add("NewChartArea");

            Legend legend = new Legend();
            legend.Name = "legend1";
            legend.Title = "Satisfaction de moi et de la SPPP";
            chart1.Legends.Add("legend1");

            Series series1 = new Series();
            series1.LegendText = "Zone de notification";
            series1.Name = "series1";
            chart1.Series.Add("series1");

            chart1.Series["series1"].Legend = "legend1";
            chart1.Series["series1"].IsVisibleInLegend = true;

            Satisfaction satisfaction = new Satisfaction();
             satisfaction.Ambiance = 1 ;
             satisfaction.Materiel =  2;
             satisfaction.Secteur=  3;
             satisfaction.Cadre =  4;
             satisfaction.Futur =  5;

            Double[] doubltte = new Double[] { satisfaction.Ambiance ,
             satisfaction.Materiel ,
             satisfaction.Secteur,
             satisfaction.Cadre,
             satisfaction.Futur  };

            String[] strinnng = new String[] { "Ambiance", "Materiel", "Secteur", "Cadre",                      "Futur" };

            chart1.Series["series1"].Points.DataBindXY(strinnng, doubltte);

            chart1.Series["series1"].ChartType = SeriesChartType.Radar;
        }
Ejemplo n.º 18
0
        private void Graphique_Load(object sender, EventArgs e)
        {
            chartEvaluationMOD.Dock = DockStyle.Fill;
            chartEvaluationMOD.Palette = ChartColorPalette.Fire;
            chartEvaluationMOD.Titles.Add("Title1");
            chartEvaluationMOD.Titles["Title1"].Text = "Graphique";

            ChartArea chartarea = new ChartArea();
            chartarea.Name = "NewChartArea";
            chartEvaluationMOD.ChartAreas.Add("NewChartArea");

            Legend legend = new Legend();
            legend.Name = "legend1";
            legend.Title = "Donnée du graphique";
            chartEvaluationMOD.Legends.Add("legend1");

            Series series1 = new Series();
            series1.LegendText = "Zone de notification";
            series1.Name = "series1";
            chartEvaluationMOD.Series.Add("series1");

            chartEvaluationMOD.Series["series1"].Legend = "legend1";
            chartEvaluationMOD.Series["series1"].IsVisibleInLegend = true;

            Evaluation evaluationMOD = new Evaluation();

            evaluationMOD.Relation =4 ;
            evaluationMOD.Qualite = 2;
            evaluationMOD.Realisation =3 ;
            evaluationMOD.Polyvalence = 4;
            evaluationMOD.Assiduite = 3;
            evaluationMOD. Motivation =4 ;
            evaluationMOD.Autonomie = 1;
            evaluationMOD.RespectConsigne =2 ;

            Double[] doubltte = new Double[] { evaluationMOD.Relation, evaluationMOD.Qualite, evaluationMOD.Realisation, evaluationMOD.Polyvalence, evaluationMOD.Assiduite, evaluationMOD.Motivation, evaluationMOD.Autonomie, evaluationMOD.RespectConsigne };

            String[] strinnng = new String[] { "Relation", "Qualité", "Réalisation", "Polyvalence", "Assiduite", "Motivation", "Autonomie", "Respect des Consigne" };

            chartEvaluationMOD.Series["series1"].Points.DataBindXY(strinnng, doubltte);

            chartEvaluationMOD.Series["series1"].ChartType = SeriesChartType.Radar;
        }
Ejemplo n.º 19
0
        private void Graphique_Load(object sender, EventArgs e)
        {
            chartEvaluationMoi.Dock = DockStyle.Fill;
            chartEvaluationMoi.Palette = ChartColorPalette.Chocolate;
            chartEvaluationMoi.Titles.Add("Title1");
            chartEvaluationMoi.Titles["Title1"].Text = "Graphique";

            ChartArea chartarea = new ChartArea();
            chartarea.Name = "NewChartArea";
            chartEvaluationMoi.ChartAreas.Add("NewChartArea");

            Legend legend = new Legend();
            legend.Name = "legend1";
            legend.Title = "Donnée du graphique";
            chartEvaluationMoi.Legends.Add("legend1");

            Series series1 = new Series();
            series1.LegendText = "Zone de notification";
            series1.Name = "series1";
            chartEvaluationMoi.Series.Add("series1");

            chartEvaluationMoi.Series["series1"].Legend = "legend1";
            chartEvaluationMoi.Series["series1"].IsVisibleInLegend = true;

            EvaluationMoi evaluation = new EvaluationMoi();
            // rentrer les valeurs de la personne
            evaluation.Communication = 1;
            evaluation.SensRelationnel = 2;
            evaluation.Implication = 5;
            evaluation.Competence = 2;
            evaluation.Performance = 3;
            evaluation.Management =4 ;
            evaluation.Objectifs = 2;

            Double[] Note = new Double[] {evaluation.Communication,evaluation.SensRelationnel,evaluation.Implication,evaluation.Competence,evaluation.Performance,evaluation.Management,evaluation.Objectifs};

            String[] Libelle = new String[] { "Communication", "Sens relationnel", "Implication", "Compétences", "Performances","Management","Objectifs" };

            chartEvaluationMoi.Series["series1"].Points.DataBindXY(Libelle, Note);

            chartEvaluationMoi.Series["series1"].ChartType = SeriesChartType.Radar;
        }
Ejemplo n.º 20
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            Chart chart = this.FindName("MyWinformChart") as Chart;

            chart.Legends.Clear();

            System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();

            legend1.BackColor = System.Drawing.Color.White;
            legend1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
            legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;
            legend1.Alignment = System.Drawing.StringAlignment.Center;
            legend1.LegendStyle = System.Windows.Forms.DataVisualization.Charting.LegendStyle.Table;
            legend1.Name = "Default";
            legend1.ShadowOffset = 2;

            chart.Legends.Add(legend1);

            chart.Invalidate();
        }
Ejemplo n.º 21
0
        private Chart CreateLinearChart(Legend legend, Title title, Dictionary<DateTime, int> dpc)
        {
            var chart = new Chart();
            chart.Size = new Size(800, 250);
            chart.Titles.Add(title);
            var chartArea = new ChartArea();
            chartArea.AxisX.IntervalAutoMode = IntervalAutoMode.VariableCount;
            chart.ChartAreas.Add(chartArea);

            var series = new Series();
            series.Name = "Number of events";
            series.ChartType = SeriesChartType.Line;

            chart.Legends.Add(legend);
            chart.Series.Add(series);

            foreach (var entry in dpc)
                chart.Series["Number of events"].Points.AddXY(entry.Key, entry.Value);
            chart.Dock = DockStyle.Fill;
            return chart;
        }
        private void GenerarReporte(List<Cita> list_citas)
        {
            int i = 0; int j = 1; int iguales = 0;
            this.chtGrafico.Titles.Add(" Reportes Pacientes  " + DateTime.Now);
            ArrayList list_iguales = new ArrayList();
           //this.chtGrafico.ChartAreas[0].Area3DStyle.Enable3D = true;
           //this.chtGrafico.ChartAreas[0].AxisX.LabelStyle.Format = DateTime;
            foreach (Cita cita in list_citas){

                this.list_fechas.Add(cita.Fecha);
            }
            SortedSet<DateTime> set = new SortedSet<DateTime>(list_fechas);

            foreach (DateTime val in set) {
                iguales = 0;
                foreach (Cita cita in list_citas) {
                    if (cita.Fecha == val) {
                        ++iguales;
                    }
                }
                list_iguales.Add(iguales);
            }
            
            int x = list_fechas.Count;
            int y = set.Count;
            foreach (DateTime val in set)
            {
                Series serie = new Series();
                Legend legend = new Legend();
                serie.Legend = val.ToString();
                legend.Name = "Hora-" + val;
                legend.Title = "Horas de atencion";
                this.chtGrafico.Legends.Add(legend);
                serie = this.chtGrafico.Series.Add(val.ToString());
                serie.Points.AddXY(j, list_iguales[i]);
                ++i; ++j;
                
            }
            chtGrafico.Update();
        }
 //Initializing Chart area
 public void InitializeChart()
 {
     this.components = new System.ComponentModel.Container();
     ChartArea chartArea1 = new ChartArea();
     Legend legend1 = new Legend() { BackColor = Color.FloralWhite, ForeColor = Color.Black, Title = "SocioEconomic Indicators" };
     pieChart = new Chart();
     ((ISupportInitialize)(pieChart)).BeginInit();
     SuspendLayout();
     //===Pie chart
     chartArea1.Name = "PieChartArea";
     pieChart.ChartAreas.Add(chartArea1);
     pieChart.Dock = System.Windows.Forms.DockStyle.Fill;
     legend1.Name = "Legend1";
     pieChart.Legends.Add(legend1);
     pieChart.Location = new System.Drawing.Point(0, 500);
     AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     //this.ClientSize = new System.Drawing.Size(284, 262);
     this.Load += new EventHandler(PieChart_CommunityWise_Load);
     ((ISupportInitialize)(this.pieChart)).EndInit();
     this.ResumeLayout(false);
 }
Ejemplo n.º 24
0
        /// <summary>
        /// Creates the standard chart.
        /// </summary>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="title">The title.</param>
        /// <returns></returns>
        public Chart CreateStandardChart(int width, int height, string title)
        {
            // Inital Setup
            var chart1 = new Chart
                             {
                                 Width = width,
                                 Height = height,
                                 Palette = ChartColorPalette.Chocolate,
                                 BackColor = Color.SeaGreen,
                                 BackGradientStyle = GradientStyle.DiagonalLeft
                             };

            // Add title
            var t = new Title(title, Docking.Top, new Font("Trebuchet MS", 10, FontStyle.Bold), Color.Black);
            chart1.Titles.Add(t);

            // Add Chart Area
            chart1.ChartAreas.Add("Area1");

            chart1.BorderSkin.SkinStyle = BorderSkinStyle.FrameTitle1;
            chart1.BorderColor = Color.Black;
            chart1.BorderWidth = 2;

            // Add Legends
            Legend legend1 = new Legend("Legend1");
            legend1.Alignment = StringAlignment.Near;
            legend1.Docking = Docking.Bottom;
            chart1.Legends.Add(legend1);

            chart1.ChartAreas[0].AxisX.MajorGrid.LineDashStyle = ChartDashStyle.Dash;
            chart1.ChartAreas[0].AxisY.MajorGrid.LineDashStyle = ChartDashStyle.Dash;
            chart1.ChartAreas[0].AxisX.MajorGrid.LineDashStyle = ChartDashStyle.Dash;
            chart1.ChartAreas[0].AxisY.MajorGrid.LineDashStyle = ChartDashStyle.Dash;
            chart1.ChartAreas[0].AxisX.MajorGrid.LineColor = Color.Silver;
            chart1.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.Silver;

            return chart1;
        }
Ejemplo n.º 25
0
        private void checkBox1_CheckedChanged(object sender, System.EventArgs e)
        {
            if (this.checkBox1.Checked)
            {
                // Add a second legend
                Legend secondLegend = new Legend("Second");
                secondLegend.BackColor = Color.FromArgb(((System.Byte)(220)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
                secondLegend.BorderColor = Color.Gray;
                secondLegend.Font = this.Chart1.Legends["Default"].Font;

                this.Chart1.Legends.Add(secondLegend);

                // Associate Series 2 with the second legend
                this.Chart1.Series["Series 2"].Legend = "Second";

                // Dock the default legend inside the first chart area
                this.Chart1.Legends["Default"].IsDockedInsideChartArea = true;
                this.Chart1.Legends["Default"].DockedToChartArea = "Default";

                // Dock the second legend inside the second chart area
                secondLegend.IsDockedInsideChartArea = true;
                secondLegend.DockedToChartArea = "Chart Area 2";
            }
            else // button not checked
            {
                // Remove the second legend
                Legend secondLegend = this.Chart1.Legends["Second"];
                this.Chart1.Legends.Remove(secondLegend);

                // Assosiate Series 2 with the default legend
                this.Chart1.Series["Series 2"].Legend = "Default";

                // Undock the default legend from the first chart area
                this.Chart1.Legends["Default"].IsDockedInsideChartArea = false;
                this.Chart1.Legends["Default"].DockedToChartArea = "";
            }
        }
Ejemplo n.º 26
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent(PlotData seriesToPlot) {
			System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
			System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
			this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
			((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
			this.SuspendLayout();
			// 
			// chart1
			// 
			chartArea1.Name = "ChartArea1";
			chartArea1.AxisX.Enabled = AxisEnabled.True;
		
			this.chart1.ChartAreas.Add(chartArea1);
			this.chart1.Dock = System.Windows.Forms.DockStyle.Fill;
			legend1.Name = "Legend1";
			this.chart1.Legends.Add(legend1);
			this.chart1.Location = new System.Drawing.Point(0, 0);
			this.chart1.Name = "chart1";
			foreach (var ser in seriesToPlot.GetData()) {
				this.chart1.Series.Add(ser);
			}
			this.chart1.Size = new System.Drawing.Size(728, 433);
			this.chart1.TabIndex = 0;
			this.chart1.Text = "chart1";
			// 
			// Chart
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.ClientSize = new System.Drawing.Size(728, 433);
			this.Controls.Add(this.chart1);
			this.Name = "Chart";
			this.Text = "DataChart";
			((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
			this.ResumeLayout(false);

		}
Ejemplo n.º 27
0
        private void Graphique_Load(object sender, EventArgs e)
        {
            chartGraphiqueHierarchie.Dock = DockStyle.Fill;
            chartGraphiqueHierarchie.Palette = ChartColorPalette.EarthTones;
            chartGraphiqueHierarchie.Titles.Add("Title1");
            chartGraphiqueHierarchie.Titles["Title1"].Text = "Graphique";

            ChartArea chartarea = new ChartArea();
            chartarea.Name = "NewChartArea";
            chartGraphiqueHierarchie.ChartAreas.Add("NewChartArea");

            Legend legend = new Legend();
            legend.Name = "legend1";
            legend.Title = "Ma hiérarchie et moi ";
            chartGraphiqueHierarchie.Legends.Add("legend1");

            Series series1 = new Series();
            series1.LegendText = "Zone de notification";
            series1.Name = "series1";
            chartGraphiqueHierarchie.Series.Add("series1");

            chartGraphiqueHierarchie.Series["series1"].Legend = "legend1";
            chartGraphiqueHierarchie.Series["series1"].IsVisibleInLegend = true;

            Satisfaction satisfaction = new Satisfaction();

            satisfaction.MesIdees = 3;
            satisfaction.ReunionService = 2;
            satisfaction.LaDirection = 4;

            Double[] doubltte = new Double[] { satisfaction.MesIdees, satisfaction.ReunionService, satisfaction.LaDirection};
            String[] strinnng = new String[] { "Mes Idées", "Réunion de Service", "La Direction"};

            chartGraphiqueHierarchie.Series["series1"].Points.DataBindXY(strinnng, doubltte);

            chartGraphiqueHierarchie.Series["series1"].ChartType = SeriesChartType.Radar;
        }
Ejemplo n.º 28
0
        public override void setObjs(IEnumerable<DGObject> objs)
        {
            base.setObjs(objs);

            if (objs == null || objs.Count() == 0)
                return;
            MonGroup firstMonGroup = objs.First() as MonGroup;
            string unit = ChartHelper.getMonGroupUnit(firstMonGroup);

            Chart chart1 = new Chart();
            chart1.Name = "Chart1";
            chart1.Text = "Chart1";

            ChartArea chartArea1 = new ChartArea("ChartArea1");
            ChartHelper.setChartAreaStyle(chartArea1);
            chartArea1.AxisX.Title = "Value (" + unit + ")";
            chartArea1.AxisY.Title = "Distance (m)";
            chart1.ChartAreas.Add(chartArea1);

            Legend legend1 = new Legend("Legend1");
            legend1.DockedToChartArea = "ChartArea1";
            chart1.Legends.Add(legend1);

            foreach (DGObject obj in objs)
            {
                MonGroup monGroup = obj as MonGroup;
                if (monGroup == null)
                    continue;
                if (monGroup.monPntDict.Count == 0)
                    continue;

                AddMonGroup(chart1, monGroup);

                chartHost.Child = chart1;
            }
        }
Ejemplo n.º 29
0
 public FormSystem()
 {
     InitializeComponent();
     this.chart2 = new System.Windows.Forms.DataVisualization.Charting.Chart();
     System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
     System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
     ((System.ComponentModel.ISupportInitialize)(this.chart2)).BeginInit();
     this.tabPage2.Controls.Add(this.chart2);
     chartArea2.Name = "ChartArea1";
     this.chart2.ChartAreas.Add(chartArea2);
     legend2.Name = "Legend1";
     this.chart2.Legends.Add(legend2);
     this.chart2.Location = new System.Drawing.Point(12, 75);
     this.chart2.Name = "chart2";
     series2.ChartArea = "ChartArea1";
     series2.Legend = "Legend1";
     series2.Name = "Series1";
     this.chart2.Series.Add(series2);
     this.chart2.Size = new System.Drawing.Size(850, 250);
     this.chart2.TabIndex = 13;
     this.chart2.Text = "chart1";
     ((System.ComponentModel.ISupportInitialize)(this.chart2)).EndInit();
 }
Ejemplo n.º 30
0
 /// <summary> 
 /// Required method for Designer support - do not modify 
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
     System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title();
     this.label9 = new System.Windows.Forms.Label();
     this.panel1 = new System.Windows.Forms.Panel();
     this.label6 = new System.Windows.Forms.Label();
     this.label5 = new System.Windows.Forms.Label();
     this.label4 = new System.Windows.Forms.Label();
     this.label3 = new System.Windows.Forms.Label();
     this.label15 = new System.Windows.Forms.Label();
     this.Chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).BeginInit();
     this.SuspendLayout();
     //
     // label9
     //
     this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                 | System.Windows.Forms.AnchorStyles.Right)));
     this.label9.Font = new System.Drawing.Font("Verdana", 11F);
     this.label9.Location = new System.Drawing.Point(16, 8);
     this.label9.Name = "label9";
     this.label9.Size = new System.Drawing.Size(702, 34);
     this.label9.TabIndex = 0;
     this.label9.Text = "This sample emonstrates how to bind XML data to a Chart control.";
     this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.label6);
     this.panel1.Controls.Add(this.label5);
     this.panel1.Controls.Add(this.label4);
     this.panel1.Controls.Add(this.label3);
     this.panel1.Controls.Add(this.label15);
     this.panel1.Location = new System.Drawing.Point(432, 56);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(292, 288);
     this.panel1.TabIndex = 19;
     //
     // label6
     //
     this.label6.Location = new System.Drawing.Point(64, 403);
     this.label6.Name = "label6";
     this.label6.Size = new System.Drawing.Size(100, 23);
     this.label6.TabIndex = 5;
     this.label6.Text = "Border Size:";
     //
     // label5
     //
     this.label5.Location = new System.Drawing.Point(64, 380);
     this.label5.Name = "label5";
     this.label5.Size = new System.Drawing.Size(100, 23);
     this.label5.TabIndex = 4;
     this.label5.Text = "Border Color:";
     //
     // label4
     //
     this.label4.Location = new System.Drawing.Point(64, 357);
     this.label4.Name = "label4";
     this.label4.Size = new System.Drawing.Size(100, 23);
     this.label4.TabIndex = 3;
     this.label4.Text = "Hatch Style:";
     //
     // label3
     //
     this.label3.Location = new System.Drawing.Point(64, 334);
     this.label3.Name = "label3";
     this.label3.Size = new System.Drawing.Size(100, 23);
     this.label3.TabIndex = 2;
     this.label3.Text = "Gradient:";
     //
     // label15
     //
     this.label15.Location = new System.Drawing.Point(64, 426);
     this.label15.Name = "label15";
     this.label15.Size = new System.Drawing.Size(100, 23);
     this.label15.TabIndex = 5;
     this.label15.Text = "Border Size:";
     //
     // Chart1
     //
     this.Chart1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(223)))), ((int)(((byte)(193)))));
     this.Chart1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     this.Chart1.BorderlineColor = System.Drawing.Color.FromArgb(((int)(((byte)(181)))), ((int)(((byte)(64)))), ((int)(((byte)(1)))));
     this.Chart1.BorderlineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     this.Chart1.BorderlineWidth = 2;
     this.Chart1.BorderSkin.SkinStyle = System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.Emboss;
     chartArea1.Area3DStyle.Enable3D = true;
     chartArea1.Area3DStyle.Inclination = -29;
     chartArea1.Area3DStyle.IsClustered = true;
     chartArea1.Area3DStyle.IsRightAngleAxes = false;
     chartArea1.Area3DStyle.Perspective = 10;
     chartArea1.Area3DStyle.Rotation = 6;
     chartArea1.Area3DStyle.WallWidth = 0;
     chartArea1.AxisX.Interval = 1;
     chartArea1.AxisX.IsLabelAutoFit = false;
     chartArea1.AxisX.LabelAutoFitStyle = ((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles)((((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.DecreaseFont | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.StaggeredLabels)
                 | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.LabelsAngleStep30)
                 | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.WordWrap)));
     chartArea1.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisX.LabelStyle.IsEndLabelVisible = false;
     chartArea1.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX.MajorTickMark.Enabled = false;
     chartArea1.AxisX2.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.AxisY.LabelAutoFitStyle = ((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles)(((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.DecreaseFont | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.StaggeredLabels)
                 | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.WordWrap)));
     chartArea1.AxisY.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisY.LabelStyle.Format = "0,k";
     chartArea1.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY2.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.BackColor = System.Drawing.Color.OldLace;
     chartArea1.BackSecondaryColor = System.Drawing.Color.White;
     chartArea1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.BorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     chartArea1.Name = "Default";
     chartArea1.ShadowColor = System.Drawing.Color.Transparent;
     this.Chart1.ChartAreas.Add(chartArea1);
     legend1.Alignment = System.Drawing.StringAlignment.Far;
     legend1.BackColor = System.Drawing.Color.Transparent;
     legend1.Enabled = false;
     legend1.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     legend1.IsDockedInsideChartArea = false;
     legend1.IsTextAutoFit = false;
     legend1.Name = "Default";
     this.Chart1.Legends.Add(legend1);
     this.Chart1.Location = new System.Drawing.Point(16, 48);
     this.Chart1.Name = "Chart1";
     series1.BorderColor = System.Drawing.Color.SteelBlue;
     series1.BorderWidth = 0;
     series1.ChartArea = "Default";
     series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bar;
     series1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(65)))), ((int)(((byte)(140)))), ((int)(((byte)(240)))));
     series1.Legend = "Default";
     series1.Name = "Series1";
     series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Double;
     series1.YValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Double;
     this.Chart1.Series.Add(series1);
     this.Chart1.Size = new System.Drawing.Size(412, 296);
     this.Chart1.TabIndex = 0;
     title1.Alignment = System.Drawing.ContentAlignment.TopLeft;
     title1.Font = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Bold);
     title1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     title1.Name = "Title1";
     title1.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
     title1.ShadowOffset = 3;
     title1.Text = "XML Binding";
     this.Chart1.Titles.Add(title1);
     this.Chart1.Click += new System.EventHandler(this.Chart1_Click);
     //
     // XMLData
     //
     this.Controls.Add(this.Chart1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.label9);
     this.Font = new System.Drawing.Font("Verdana", 9F);
     this.Name = "XMLData";
     this.Size = new System.Drawing.Size(728, 480);
     this.Load += new System.EventHandler(this.ArrayBinding_Load);
     this.panel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).EndInit();
     this.ResumeLayout(false);
 }
Ejemplo n.º 31
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     System.Windows.Forms.DataVisualization.Charting.Legend    legend1    = new System.Windows.Forms.DataVisualization.Charting.Legend();
     System.Windows.Forms.DataVisualization.Charting.Series    series1    = new System.Windows.Forms.DataVisualization.Charting.Series();
     this.label9            = new System.Windows.Forms.Label();
     this.panel1            = new System.Windows.Forms.Panel();
     this.YAxisIntervalList = new System.Windows.Forms.ComboBox();
     this.XAxisIntervalList = new System.Windows.Forms.ComboBox();
     this.PointsNumberList  = new System.Windows.Forms.ComboBox();
     this.label7            = new System.Windows.Forms.Label();
     this.label2            = new System.Windows.Forms.Label();
     this.label1            = new System.Windows.Forms.Label();
     this.label6            = new System.Windows.Forms.Label();
     this.label5            = new System.Windows.Forms.Label();
     this.label4            = new System.Windows.Forms.Label();
     this.label3            = new System.Windows.Forms.Label();
     this.label15           = new System.Windows.Forms.Label();
     this.Chart1            = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.label8            = new System.Windows.Forms.Label();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).BeginInit();
     this.SuspendLayout();
     //
     // label9
     //
     this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.label9.Font     = new System.Drawing.Font("Verdana", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label9.Location = new System.Drawing.Point(16, 14);
     this.label9.Name     = "label9";
     this.label9.Size     = new System.Drawing.Size(702, 43);
     this.label9.TabIndex = 0;
     this.label9.Text     = "This sample demonstrates how to set axis interval properties, which are applied t" +
                            "o the axis\' labels, major grid lines, and tick marks. ";
     this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.YAxisIntervalList);
     this.panel1.Controls.Add(this.XAxisIntervalList);
     this.panel1.Controls.Add(this.PointsNumberList);
     this.panel1.Controls.Add(this.label7);
     this.panel1.Controls.Add(this.label2);
     this.panel1.Controls.Add(this.label1);
     this.panel1.Controls.Add(this.label6);
     this.panel1.Controls.Add(this.label5);
     this.panel1.Controls.Add(this.label4);
     this.panel1.Controls.Add(this.label3);
     this.panel1.Controls.Add(this.label15);
     this.panel1.Location = new System.Drawing.Point(432, 73);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(292, 288);
     this.panel1.TabIndex = 2;
     //
     // YAxisIntervalList
     //
     this.YAxisIntervalList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.YAxisIntervalList.Items.AddRange(new object[] {
         "Auto",
         "100",
         "200",
         "250",
         "500"
     });
     this.YAxisIntervalList.Location              = new System.Drawing.Point(168, 40);
     this.YAxisIntervalList.Name                  = "YAxisIntervalList";
     this.YAxisIntervalList.Size                  = new System.Drawing.Size(124, 22);
     this.YAxisIntervalList.TabIndex              = 3;
     this.YAxisIntervalList.SelectedIndexChanged += new System.EventHandler(this.Combo_SelectedIndexChanged);
     //
     // XAxisIntervalList
     //
     this.XAxisIntervalList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.XAxisIntervalList.Items.AddRange(new object[] {
         "Auto",
         "Every Week (Starting Sunday)",
         "Every Week (Starting Monday)",
         "Every 2 Weeks",
         "Every Month (Starting at 1st)",
         "Every Month (Starting at 15th)"
     });
     this.XAxisIntervalList.Location              = new System.Drawing.Point(74, 104);
     this.XAxisIntervalList.Name                  = "XAxisIntervalList";
     this.XAxisIntervalList.Size                  = new System.Drawing.Size(216, 22);
     this.XAxisIntervalList.TabIndex              = 5;
     this.XAxisIntervalList.SelectedIndexChanged += new System.EventHandler(this.Combo_SelectedIndexChanged);
     //
     // PointsNumberList
     //
     this.PointsNumberList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.PointsNumberList.Items.AddRange(new object[] {
         "30",
         "50",
         "70"
     });
     this.PointsNumberList.Location              = new System.Drawing.Point(168, 8);
     this.PointsNumberList.Name                  = "PointsNumberList";
     this.PointsNumberList.Size                  = new System.Drawing.Size(124, 22);
     this.PointsNumberList.TabIndex              = 1;
     this.PointsNumberList.SelectedIndexChanged += new System.EventHandler(this.PointsNumberList_SelectedIndexChanged);
     //
     // label7
     //
     this.label7.Location  = new System.Drawing.Point(4, 40);
     this.label7.Name      = "label7";
     this.label7.Size      = new System.Drawing.Size(160, 23);
     this.label7.TabIndex  = 2;
     this.label7.Text      = "&Y Axis Interval:";
     this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label2
     //
     this.label2.Location  = new System.Drawing.Point(12, 80);
     this.label2.Name      = "label2";
     this.label2.Size      = new System.Drawing.Size(156, 23);
     this.label2.TabIndex  = 4;
     this.label2.Text      = "&X Axis Interval:";
     this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label1
     //
     this.label1.Location  = new System.Drawing.Point(4, 8);
     this.label1.Name      = "label1";
     this.label1.Size      = new System.Drawing.Size(160, 23);
     this.label1.TabIndex  = 0;
     this.label1.Text      = "Number of &Days:";
     this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label6
     //
     this.label6.Location = new System.Drawing.Point(64, 403);
     this.label6.Name     = "label6";
     this.label6.Size     = new System.Drawing.Size(100, 23);
     this.label6.TabIndex = 10;
     this.label6.Text     = "Border Size:";
     //
     // label5
     //
     this.label5.Location = new System.Drawing.Point(64, 380);
     this.label5.Name     = "label5";
     this.label5.Size     = new System.Drawing.Size(100, 23);
     this.label5.TabIndex = 9;
     this.label5.Text     = "Border Color:";
     //
     // label4
     //
     this.label4.Location = new System.Drawing.Point(64, 357);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(100, 23);
     this.label4.TabIndex = 8;
     this.label4.Text     = "Hatch Style:";
     //
     // label3
     //
     this.label3.Location = new System.Drawing.Point(64, 334);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(100, 23);
     this.label3.TabIndex = 7;
     this.label3.Text     = "Gradient:";
     //
     // label15
     //
     this.label15.Location = new System.Drawing.Point(64, 426);
     this.label15.Name     = "label15";
     this.label15.Size     = new System.Drawing.Size(100, 23);
     this.label15.TabIndex = 5;
     this.label15.Text     = "Border Size:";
     //
     // Chart1
     //
     this.Chart1.BackColor                   = System.Drawing.Color.WhiteSmoke;
     this.Chart1.BackGradientStyle           = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     this.Chart1.BackSecondaryColor          = System.Drawing.Color.White;
     this.Chart1.BorderlineColor             = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     this.Chart1.BorderlineDashStyle         = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     this.Chart1.BorderlineWidth             = 2;
     this.Chart1.BorderSkin.SkinStyle        = System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.Emboss;
     chartArea1.Area3DStyle.Inclination      = 15;
     chartArea1.Area3DStyle.IsClustered      = true;
     chartArea1.Area3DStyle.IsRightAngleAxes = false;
     chartArea1.Area3DStyle.Perspective      = 10;
     chartArea1.Area3DStyle.Rotation         = 10;
     chartArea1.Area3DStyle.WallWidth        = 0;
     chartArea1.AxisX.LabelAutoFitStyle      = ((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles)(((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.StaggeredLabels | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.LabelsAngleStep30)
                                                                                                                      | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.WordWrap)));
     chartArea1.AxisX.LabelStyle.Font     = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisX.LabelStyle.Format   = "dd MMM";
     chartArea1.AxisX.LineColor           = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX2.Enabled            = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.AxisY.IsLabelAutoFit      = false;
     chartArea1.AxisY.LabelStyle.Font     = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisY.LineColor           = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY2.Enabled            = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.AxisY2.MajorGrid.Enabled  = false;
     chartArea1.BackColor                = System.Drawing.Color.Gainsboro;
     chartArea1.BackGradientStyle        = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     chartArea1.BackSecondaryColor       = System.Drawing.Color.White;
     chartArea1.BorderColor              = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.InnerPlotPosition.Auto   = false;
     chartArea1.InnerPlotPosition.Height = 82F;
     chartArea1.InnerPlotPosition.Width  = 84.7138F;
     chartArea1.InnerPlotPosition.X      = 8.2422F;
     chartArea1.InnerPlotPosition.Y      = 2.99507F;
     chartArea1.Name            = "Default";
     chartArea1.Position.Auto   = false;
     chartArea1.Position.Height = 87.64407F;
     chartArea1.Position.Width  = 89.43796F;
     chartArea1.Position.X      = 4.824818F;
     chartArea1.Position.Y      = 5.542373F;
     chartArea1.ShadowColor     = System.Drawing.Color.Transparent;
     this.Chart1.ChartAreas.Add(chartArea1);
     legend1.BackColor     = System.Drawing.Color.Transparent;
     legend1.Enabled       = false;
     legend1.Font          = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     legend1.IsTextAutoFit = false;
     legend1.Name          = "Default";
     this.Chart1.Legends.Add(legend1);
     this.Chart1.Location     = new System.Drawing.Point(16, 65);
     this.Chart1.Name         = "Chart1";
     series1.BorderColor      = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series1.ChartArea        = "Default";
     series1.Color            = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(65)))), ((int)(((byte)(140)))), ((int)(((byte)(240)))));
     series1.CustomProperties = "DrawingStyle=Emboss, PointWidth=0.9";
     series1.Legend           = "Default";
     series1.Name             = "Series1";
     this.Chart1.Series.Add(series1);
     this.Chart1.Size     = new System.Drawing.Size(412, 296);
     this.Chart1.TabIndex = 1;
     //
     // label8
     //
     this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.label8.Font     = new System.Drawing.Font("Verdana", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label8.Location = new System.Drawing.Point(16, 377);
     this.label8.Name     = "label8";
     this.label8.Size     = new System.Drawing.Size(702, 40);
     this.label8.TabIndex = 3;
     this.label8.Text     = "Major and minor grid lines, tick marks, and label objects of an axis also have th" +
                            "eir own interval related properties, which take precedence over the axis propert" +
                            "ies.";
     //
     // AxisLabelsInterval
     //
     this.Controls.Add(this.label8);
     this.Controls.Add(this.Chart1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.label9);
     this.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name = "AxisLabelsInterval";
     this.Size = new System.Drawing.Size(728, 480);
     this.panel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).EndInit();
     this.ResumeLayout(false);
 }