Example #1
0
        static void Main(string[] args)
        {
            //获取配置文件中的chartType的值
            string type  = System.Configuration.ConfigurationManager.AppSettings["chartType"];
            IChart chart = ChartFactory.GetChart(type);

            chart.Display();
        }
Example #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            IChart chart = ChartFactory.GetChart("pie");

            chart.Display();
            Console.ReadKey();
        }
Example #3
0
        /// <summary>
        /// 查看报表
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSelect_Click(object sender, EventArgs e)
        {
            IChart chart = ChartFactory.GetChart(comboBox1.SelectedIndex.ToString());

            MessageBox.Show(chart.Display());
        }