Inheritance: ElementHost
Exemple #1
0
        public void DrawingPiechart(List <chartdataPie> chartdatas, ref LiveCharts.WinForms.PieChart pieChart1)
        {
            pieChart1.Series.Clear();
            pieChart1.Controls.Clear();
            pieChart1.InnerRadius            = 100;
            pieChart1.LegendLocation         = LegendLocation.Top;
            pieChart1.Series                 = new SeriesCollection();
            pieChart1.Text                   = " Defect Type Rate ( % )";
            pieChart1.DefaultLegend.Margin   = new Thickness(30);
            pieChart1.DefaultLegend.FontSize = 20;
            pieChart1.LegendLocation         = LegendLocation.Top;

            foreach (var item in chartdatas)
            {
                PieSeries pie = new PieSeries
                {
                    Title  = item.Label,
                    Values = new ChartValues <double> {
                        item.value
                    },
                    PushOut = 5,


                    DataLabels = true
                };
                pieChart1.Series.Add(pie);
            }
        }
Exemple #2
0
 public negocios()
 {
     InitializeComponent();
     this.Dock     = DockStyle.Fill;
     graficoPastel = new PieChart();
     this.Controls.Add(graficoPastel);
     graficoPastel.Parent = tabControl1.TabPages[2];
 }
Exemple #3
0
        public static void SetData(this LiveCharts.WinForms.PieChart chart, List <PieSeries> data)
        {
            data.ForEach(d => chart.Series.Add(d));

            chart.AxisX.Add(new Axis
            {
                Title  = "Person",
                Labels = new[] { "pi", "e", "ch", "art" }
            });

            chart.AxisX.Add(new Axis
            {
                Title  = "Virus",
                Labels = new[] { "l", "ee", "cc", "kk" }
            });
        }
        public void ProductionStatusChart()
        {
            //**************** 1nd 모델 생산현황 차트(원형 차트) ******************
            Func <ChartPoint, string> labelPoint = chartPoint =>
                                                   string.Format("{0} ({1:P})", chartPoint.Y, chartPoint.Participation);

            pieChart1          = new LiveCharts.WinForms.PieChart();
            pieChart1.Dock     = System.Windows.Forms.DockStyle.Fill;
            pieChart1.Location = new System.Drawing.Point(0, 0);
            pieChart1.Name     = "pieChart1";
            pieChart1.Size     = new System.Drawing.Size(608, 366);
            pieChart1.TabIndex = 0;
            pieChart1.Text     = "pieChart1";

            panel10.Controls.Add(pieChart1);

            pieChart1.Series = new SeriesCollection();

            foreach (var item in planList)
            {
                pieChart1.Series.Add(new PieSeries
                {
                    Title  = item.PROD_CODE,
                    Values = new ChartValues <int> {
                        item.INSU_QTY
                    },
                    DataLabels = true,
                    LabelPoint = labelPoint
                }
                                     );
            }

            pieChart1.LegendLocation = LegendLocation.Bottom;

            foreach (var item in pieChart1.Series)
            {
            }
        }
 public PieChart()
 {
     chart      = new LiveCharts.WinForms.PieChart();
     connection = new Connection_Handler();
 }