private void RadioCheckedChanged(object sender, System.EventArgs e)
        {
            if (c1Chart1.ChartGroups[1].ChartData.SeriesList.Count < 1)
            {
                return;
            }

            RadioButton    rb = (RadioButton)sender;
            ChartHistogram ch = c1Chart1.ChartGroups[1].ChartData.SeriesList[0].Histogram;

            if (rb.Checked)
            {
                switch (rb.Text)
                {
                case "Histogram":
                    ch.DisplayType = DisplayTypeEnum.Histogram;
                    break;

                case "Frequency":
                    ch.DisplayType = DisplayTypeEnum.FrequencyGraph;
                    break;

                case "Stepped Frequency":
                    ch.DisplayType = DisplayTypeEnum.SteppedFrequencyGraph;
                    break;
                }
            }
        }
示例#2
0
        public static IChart GetChart(string type)
        {
            IChart chart = null;

            if (type.Equals("histogram"))
            {
                chart = new ChartHistogram();
                System.Console.WriteLine("Init Histogram");
            }
            else if (type.Equals("pie"))
            {
                chart = new ChartPie();
                System.Console.WriteLine("Init Pie");
            }
            else if (type.Equals("line"))
            {
                chart = new ChartLine();
                System.Console.WriteLine("Init Line");
            }

            return(chart);
        }