• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Charting.Title类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Forms.DataVisualization.Charting.Title的典型用法代码示例。如果您正苦于以下问题:C# Title类的具体用法?C# Title怎么用?C# Title使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Title类属于System.Windows.Forms.DataVisualization.Charting命名空间,在下文中一共展示了Title类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreatePieChart

        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;
        }
开发者ID:cs1msa,项目名称:logs-analyzer,代码行数:25,代码来源:Report.cs


示例2: PrettyChart

        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";
        }
开发者ID:marksl,项目名称:dependency-injection-reportgenerator,代码行数:31,代码来源:PrettyChart.cs


示例3: MadeChart

        public void MadeChart(Chart chart, int band, int[] chartData)
        {
            Series series = new Series {ChartType = SeriesChartType.SplineArea};
            Title title;
            switch (_type)
            {
                case 2:
                    title = new Title
                    {
                        Text = "遥感图像累计直方图 · 波段:" + band,
                        TextStyle = TextStyle.Shadow,
                        Font = new Font(new FontFamily("微软雅黑"), 10)
                    };
                    break;

                case 1:
                default:
                    title = new Title
                    {
                        Text = "遥感图像直方图 · 波段:" + band,
                        TextStyle = TextStyle.Shadow,
                        Font = new Font(new FontFamily("微软雅黑"), 10)
                    };
                    break;
            }

            for (int i = 1; i < chartData.Length; i++)
            {
                series.Points.AddXY(i, chartData[i]);
            }

            chart.Series.Add(series);
            chart.Titles.Add(title);
            chart.Refresh();
        }
开发者ID:XXZZQQ,项目名称:XZQ,代码行数:35,代码来源:Histogram.cs


示例4: AddChartToForm

        private Chart AddChartToForm(ChartData chartData)
        {
            var chart = new Chart { Dock = DockStyle.Fill, BackColor = Color.White };
            var title = new Title(chartData.ToString()) { Font = new Font("Verdana", 14.0f) };
            chart.Titles.Add(title);
            chart.Legends.Add(new Legend("Legend"));

            var area = new ChartArea("Main")
            {
                BackColor = Color.White,
                BackSecondaryColor = Color.LightSteelBlue,
                BackGradientStyle = GradientStyle.DiagonalRight,
                AxisY = { Maximum = 100 },
                AxisY2 = { Maximum = 20 }
            };

            area.AxisX.MajorGrid.LineColor = Color.LightSlateGray;
            area.AxisX.TitleFont = new Font("Verdana", 10.0f, FontStyle.Bold);
            area.AxisX.Title = "Date";
            area.AxisY.MajorGrid.LineColor = Color.LightSlateGray;
            area.AxisY.TitleFont = new Font("Verdana", 10.0f, FontStyle.Bold);
            area.AxisY.Title = "Weight";
            area.AxisY2.Title = "Reps";

            chart.ChartAreas.Add(area);

            var seriesColumns1 = new Series("Weights") { ChartType = SeriesChartType.Line, IsValueShownAsLabel = true };
            chart.Series.Add(seriesColumns1);
            var seriesColumns2 = new Series("Reps") { ChartType = SeriesChartType.Line };
            chart.Series.Add(seriesColumns2);

            Controls.Add(chart);

            return chart;
        }
开发者ID:gmoller,项目名称:GymWorkoutTracker,代码行数:35,代码来源:ChartControl.cs


示例5: CreatePlotAndSave

        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));
        }
开发者ID:Coderik,项目名称:NGauge,代码行数:56,代码来源:Program.cs


示例6: Form1

        public Form1()
        {
            InitializeComponent();

            // clear
            chart1.Series.Clear();
            chart1.ChartAreas.Clear();
            chart1.Titles.Clear();

            // chartarea
            ChartArea area1 = new ChartArea("Area1");
            area1.AxisX.Title = "Title1-XAxis";
            area1.AxisY.Title = "Title1-YAxis";

            ChartArea area2 = new ChartArea("Area2");
            area2.AxisX.Title = "Title2-XAxis";
            area2.AxisY.Title = "Title2-YAxis";

            Title title = new Title("Title");
            Title title1 = new Title("Title1");
            Title title2 = new Title("Title2");
            title1.DockedToChartArea = "Area1"; // ChartAreaとの紐付
            title2.DockedToChartArea = "Area2"; // ChartAreaとの紐付

            // series
            Random rdm = new Random();
            Series seriesLine = new Series();
            seriesLine.ChartType = SeriesChartType.Line;
            seriesLine.LegendText = "Legend:Line";
            seriesLine.BorderWidth = 2;
            seriesLine.MarkerStyle = MarkerStyle.Circle;
            seriesLine.MarkerSize = 12;
            for (int i = 0; i < 10; i++)
            {
                seriesLine.Points.Add(new DataPoint(i, rdm.Next(0, 210)));
            }
            seriesLine.ChartArea = "Area1"; // ChartAreaとの紐付

            Series seriesColumn = new Series();
            seriesColumn.LegendText = "Legend:Column";
            seriesColumn.ChartType = SeriesChartType.Column;
            for (int i = 0; i < 10; i++)
            {
                seriesColumn.Points.Add(new DataPoint(i, rdm.Next(0, 210)));
            }
            seriesColumn.ChartArea = "Area2"; // ChartAreaとの紐付

            chart1.Titles.Add(title);
            chart1.Titles.Add(title1);
            chart1.Titles.Add(title2);
            chart1.ChartAreas.Add(area1);
            chart1.ChartAreas.Add(area2);
            chart1.Series.Add(seriesColumn);
            chart1.Series.Add(seriesLine);
        }
开发者ID:tobira-code,项目名称:Qiita,代码行数:55,代码来源:Form1.cs


示例7: AddTitle

 private void AddTitle(Chart chart, string text)
 {
     var title = new Title
     {
         Text = text,
         Font = new Font("Arial", 7f, FontStyle.Bold),
         ForeColor = Color.FromArgb(45, 45, 48),
         Docking = Docking.Bottom,
     };
     chart.Titles.Add(title);
 }
开发者ID:etiennemottet,项目名称:opencbs,代码行数:11,代码来源:DashboardForm.cs


示例8: BuildChartPie

        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);
        }
开发者ID:hpbaotho,项目名称:top4ever-pos,代码行数:53,代码来源:FormChartReport.cs


示例9: FormChart

        public FormChart(string title)
        {
            InitializeComponent();

            Title t = new Title(title);
            t.Font = new System.Drawing.Font(t.Font.FontFamily, 20f);
            chartPlot.Titles.Add(t);

            labelOptimal.Text = string.Empty;
            labelSchedulable.Text = string.Empty;
            labelMinPi.Text = string.Empty;
            labelMinEms.Text = string.Empty;
            labelMinTms.Text = string.Empty;
        }
开发者ID:rubis-lab,项目名称:RealtimeAnalysis,代码行数:14,代码来源:FormChart.cs


示例10: CreateGraph

        //Creating a fun little graph
        public static void CreateGraph(YearMap yearMap)
        {
            //Order the list of keys to get all of the years and find out how many years there were that someone lived in
            var orderedList = yearMap.YearVals.Keys.OrderBy(x => x).ToArray();
            var numberOfYears = orderedList.Count();

            var xvals = new int[numberOfYears];
            var yvals = new int[numberOfYears];
            for (int i = 0; i < yvals.Length; i++)
            {
                yvals[i] = yearMap.YearVals[orderedList[i]];
                xvals[i] = orderedList[i];
            }

            var chart = new Chart();
            chart.Size = new Size(1000, 1000);
            Title title = new Title("Number of people alive each year");
            title.Font = new Font("Calibri", 16, System.Drawing.FontStyle.Bold);
            chart.Titles.Add(title);

            var chartArea = new ChartArea();
            chartArea.AxisX.LabelStyle.Font = new Font("Calibri", 8);
            chartArea.AxisY.LabelStyle.Font = new Font("Calibri", 8);
            chartArea.AxisY.Minimum = 0;
            chartArea.AxisX.Minimum = 1900;
            chartArea.AxisX.Maximum = 2000;
            chartArea.AxisX.Title = "Years";
            chartArea.AxisX.TitleFont = new Font("Calibri", 14, System.Drawing.FontStyle.Bold);
            chartArea.AxisY.Title = "Number of People Alive";
            chartArea.AxisY.TitleFont = new Font("Calibri", 14, System.Drawing.FontStyle.Bold);
            chartArea.AxisY.Interval = 1;
            chartArea.AxisX.Interval = 5;

            chart.ChartAreas.Add(chartArea);

            var series = new Series();
            series.Name = "Series";
            series.ChartType = SeriesChartType.Bar;
            chart.Series.Add(series);

            chart.Series["Series"].Points.DataBindXY(xvals, yvals);

            chart.Invalidate();

            chart.SaveImage("../../Output/chart.png", ChartImageFormat.Png);
        }
开发者ID:johnjalex,项目名称:YearCalc,代码行数:47,代码来源:Program.cs


示例11: GetChart

        public Chart GetChart(int DescriptorIdx)
        {
            //if (ListDescriptors[CurrentDescriptorToDisplay].GetAssociatedType().GetBinNumber() == 1) return null;

            List<double[]> CurrentHisto = GetValues(DescriptorIdx).CreateHistogram(100, false);

            Series CurrentSeries = new Series();
            //CurrentSeries.ShadowOffset = 2;

            for (int IdxValue = 0; IdxValue < CurrentHisto[0].Length; IdxValue++)
                CurrentSeries.Points.AddXY(CurrentHisto[0][IdxValue], CurrentHisto[1][IdxValue]);

            ChartArea CurrentChartArea = new ChartArea("ChartArea" + DescriptorIdx);
            CurrentChartArea.BorderColor = Color.White;

            Chart ChartToReturn = new Chart();
            ChartToReturn.ChartAreas.Add(CurrentChartArea);
            // ChartToReturn.TextAntiAliasingQuality = TextAntiAliasingQuality.High;
            CurrentChartArea.BackColor = Color.White;

            CurrentChartArea.Axes[1].LabelStyle.Enabled = false;
            CurrentChartArea.Axes[1].MajorGrid.Enabled = false;
            CurrentChartArea.Axes[0].Enabled = AxisEnabled.False;
            CurrentChartArea.Axes[1].Enabled = AxisEnabled.False;

            CurrentChartArea.Axes[0].MajorGrid.Enabled = false;
            //  CurrentChartArea.Axes[0].Title = ListDescriptors[CurrentDescriptorToDisplay].GetName();
            CurrentSeries.ChartType = SeriesChartType.Line;
            CurrentSeries.Color = Color.Black;
            // CurrentSeries.BorderWidth = 3;
            CurrentSeries.ChartArea = "ChartArea" + DescriptorIdx;

               // CurrentSeries.Name = "Series" + PosX + "x" + PosY;
            ChartToReturn.Series.Add(CurrentSeries);

            Title CurrentTitle = new Title("Reference");
            // ChartToReturn.Titles.Add(CurrentTitle);

               // ChartToReturn.Width = 100;
              //  ChartToReturn.Height = 48;

               // ChartToReturn.Update();
            //  ChartToReturn.Show();

            return ChartToReturn;
        }
开发者ID:cyrenaique,项目名称:HCSA,代码行数:46,代码来源:cReference.cs


示例12: Form1

        public Form1()
        {
            InitializeComponent();

            // clear
            chart1.Series.Clear();
            chart1.ChartAreas.Clear();
            chart1.Titles.Clear();

            Title title1 = new Title("Histgram");

            // series
            Series seriesColumn = new Series();
            seriesColumn.LegendText = "Histgram";
            seriesColumn.ChartType = SeriesChartType.Column;

            // 正規乱数を作る
            mRand = new Random(DateTime.Now.Millisecond);
            int nData = 10000;
            double[] data = new double[nData];
            for (int i = 0; i < nData; i++)
            {
                // Box-Muller法で一様乱数から正規乱数を作る
                data[i] = boxmuller(mRand, 0 /* average */ , 10 /* sigma */);
            }

            // ヒストグラムを作る
            int nBuckets = 10;
            Histogram hist = new Histogram(data, nBuckets, -50 /* lower */, 50 /* upper */);

            for (int i = 0; i < nBuckets; i++)
            {
                double mid = Math.Round((hist[i].UpperBound+hist[i].LowerBound)/2, 1);
                seriesColumn.Points.Add(new DataPoint(mid, hist[i].Count));
            }

            // chartarea
            ChartArea area1 = new ChartArea();
            area1.AxisX.Title = "Value";
            area1.AxisY.Title = "Frequency";

            chart1.Titles.Add(title1);
            chart1.ChartAreas.Add(area1);
            chart1.Series.Add(seriesColumn);
        }
开发者ID:tobira-code,项目名称:Qiita,代码行数:45,代码来源:Form1.cs


示例13: tmpContrast_Load

        private void tmpContrast_Load(object sender, EventArgs e)
        {
            Series sr = new Series("对比度") {ChartType = SeriesChartType.Line};
            Title t = new Title("1-7波段对比度")
            {
                TextStyle = TextStyle.Shadow,
                Font = new Font(new FontFamily("微软雅黑"), 15)
            };

            for (int i = 0; i < _data.Length; i++)
            {
                sr.Points.AddXY(i + 1, _data[i]);
            }

            chart1.Series.Add(sr);
            chart1.Titles.Add(t);
            chart1.Refresh();
        }
开发者ID:XXZZQQ,项目名称:XZQ,代码行数:18,代码来源:tmpContrast.cs


示例14: GenerateChart

        public static void GenerateChart(ChartParamterers parameters, string resultPath)
        {
            var csvPath = string.Format("{0}.csv", resultPath);

            var records = ReadDataFromFile(csvPath);

            var myChart = new Chart
            {
                Size = ChartSize
            };

            var myChartArea = new ChartArea();
            myChart.ChartAreas.Add(myChartArea);

            var series = new Series("default")
                             {
                                 ChartType = parameters.ChartType
                             };

            foreach (var thing in records)
            {
                series.Points.AddXY(thing.X.Length > 25 ? thing.X.Substring(0, 25) : thing.X, thing.Y);
            }

            myChart.Series.Add(series);

            if (parameters.AllValuesInXInterval)
            {
                myChart.ChartAreas[0].AxisX.Interval = 1;
            }

            var font = new Font("Arial", 12, FontStyle.Bold);
            var title = new Title
            {
                Text = resultPath,
                Font = font
            };

            myChart.Titles.Add(title);

            var pngPath = string.Format("{0}.png", resultPath);
            myChart.SaveImage(pngPath, ChartImageFormat.Png);
        }
开发者ID:dziedrius,项目名称:EILA,代码行数:43,代码来源:ChartGenerator.cs


示例15: CreateLinearChart

        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;
        }
开发者ID:cs1msa,项目名称:logs-analyzer,代码行数:21,代码来源:Report.cs


示例16: CreateStandardChart

        /// <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;
        }
开发者ID:leoslopez,项目名称:SimulacionLluvia,代码行数:45,代码来源:MVCCharts.cs


示例17: tmpContrast_Load

        private void tmpContrast_Load(object sender, EventArgs e)
        {
            Series sr = new Series("对比度")
            {
                ChartType = SeriesChartType.Column,
                IsValueShownAsLabel = true,
            };

            Title t = new Title("1-" + _data.Length + "波段对比度")
            {
                TextStyle = TextStyle.Shadow,
                Font = new Font(new FontFamily("微软雅黑"), 15)
            };

            for (int i = 1; i <= _data.Length; i++)
            {
                sr.Points.AddXY(i, Math.Round(_data[i - 1], 3));
            }

            chart1.Series.Add(sr);
            chart1.Titles.Add(t);
            chart1.Refresh();
        }
开发者ID:XXZZQQ,项目名称:RSDIP-A,代码行数:23,代码来源:tmpContrast.cs


示例18: Form1_Load

        private void Form1_Load(object sender, EventArgs e)
        {
            // objeto de clase "propiedades"
            propiedades = new Propiedades();

            // -- propiedades de los objetos en formulario
            propiedades.BackColors(this,groupBox1); //-- propiedades de color de componentes
            propiedades.Background(this); //-- imagen de fondo

            propiedades.tamanoVentana(this, groupBox1, groupBox2, groupBox1);
            climaActualToolStripMenuItem.Enabled = false;

            //-- titulo del grafico de temperaturas
            Title tituloGrafico = new Title();
            tituloGrafico.Text = "Temperaturas para los proximos días";
            tituloGrafico.Font = new Font("Arial", 13, FontStyle.Bold);
            chart1.Titles.Add(tituloGrafico);

            //-- se llena combobox con nombre de ciudades
            Negocio negocio = new Negocio();
            negocio.LlenarComboCiudades(comboBox1);
            negocio.LlenarComboCiudades(comboBox2);
        }
开发者ID:flashersv,项目名称:ProyectoClimaSV,代码行数:23,代码来源:Form1.cs


示例19: InitializeComponent

 /// <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;
//.........这里部分代码省略.........
开发者ID:zhaohengyi,项目名称:WinChartControlerSamples,代码行数:101,代码来源:XMLData.cs


示例20: InitializeComponent

 /// <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 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.Windows.Forms.DataVisualization.Charting.Title title2 = new System.Windows.Forms.DataVisualization.Charting.Title();
     this.label9 = new System.Windows.Forms.Label();
     this.Chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.panel1 = new System.Windows.Forms.Panel();
     this.button1 = new System.Windows.Forms.Button();
     this.ConnectionLine = new System.Windows.Forms.CheckBox();
     this.label1 = new System.Windows.Forms.Label();
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).BeginInit();
     this.panel1.SuspendLayout();
     this.SuspendLayout();
     //
     // label9
     //
     this.label9.Font = new System.Drawing.Font("Verdana", 11F, 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 = 2;
     this.label9.Text = "This sample demonstrates how to draw custom items using the PrePaint and PostPain" +
         "t events.";
     this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // Chart1
     //
     this.Chart1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(211)))), ((int)(((byte)(223)))), ((int)(((byte)(240)))));
     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;
     chartArea2.Area3DStyle.Inclination = 15;
     chartArea2.Area3DStyle.IsClustered = true;
     chartArea2.Area3DStyle.IsRightAngleAxes = false;
     chartArea2.Area3DStyle.Perspective = 10;
     chartArea2.Area3DStyle.Rotation = 10;
     chartArea2.Area3DStyle.WallWidth = 0;
     chartArea2.AxisX.IsMarginVisible = false;
     chartArea2.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea2.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.AxisY.IsStartedFromZero = false;
     chartArea2.AxisY.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea2.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(165)))), ((int)(((byte)(191)))), ((int)(((byte)(228)))));
     chartArea2.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     chartArea2.BackSecondaryColor = System.Drawing.Color.White;
     chartArea2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.BorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     chartArea2.Name = "Default";
     chartArea2.ShadowColor = System.Drawing.Color.Transparent;
     this.Chart1.ChartAreas.Add(chartArea2);
     legend2.Alignment = System.Drawing.StringAlignment.Center;
     legend2.BackColor = System.Drawing.Color.Transparent;
     legend2.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Bottom;
     legend2.Enabled = false;
     legend2.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     legend2.IsTextAutoFit = false;
     legend2.Name = "Default";
     this.Chart1.Legends.Add(legend2);
     this.Chart1.Location = new System.Drawing.Point(16, 65);
     this.Chart1.Name = "Chart1";
     series2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series2.BorderWidth = 3;
     series2.ChartArea = "Default";
     series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline;
     series2.Legend = "Default";
     series2.MarkerColor = System.Drawing.Color.AliceBlue;
     series2.MarkerSize = 8 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Behavior.Glyph类代码示例发布时间:2022-05-26
下一篇:
C# Charting.Series类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap