コード例 #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            chartview       = new TChart();
            chartview.Frame = new RectangleF(0, 0, 320, 460);

            //產生不同類型的圖表
            switch (chart)
            {
            case ChartType.Bar:
                var Barstyle = new Steema.TeeChart.Styles.Bar();
                Barstyle.FillSampleValues(samples);
                Barstyle.ShowInLegend  = false;
                Barstyle.Marks.Visible = true;
                chartview.Series.Add(Barstyle);
                break;

            case ChartType.Candle:
                var Candlestyle = new Steema.TeeChart.Styles.Candle();
                Candlestyle.FillSampleValues(samples);
                Candlestyle.ShowInLegend  = false;
                Candlestyle.Marks.Visible = true;
                chartview.Series.Add(Candlestyle);
                break;

            case ChartType.Bubble:
                var Bubblestyle = new Steema.TeeChart.Styles.Bubble();
                Bubblestyle.FillSampleValues(samples);
                Bubblestyle.ShowInLegend  = false;
                Bubblestyle.Marks.Visible = true;
                chartview.Series.Add(Bubblestyle);
                break;

            case ChartType.Radar:
                var Radarstyle = new Steema.TeeChart.Styles.Radar();
                Radarstyle.FillSampleValues(samples);
                Radarstyle.ShowInLegend  = false;
                Radarstyle.Marks.Visible = true;
                chartview.Series.Add(Radarstyle);
                break;

            case ChartType.Tower:
                var Towerstyle = new Steema.TeeChart.Styles.Tower();
                Towerstyle.FillSampleValues(samples);
                Towerstyle.ShowInLegend  = false;
                Towerstyle.Marks.Visible = true;
                chartview.Series.Add(Towerstyle);
                break;
            }
            View.AddSubview(chartview);
        }
コード例 #2
0
ファイル: ChartDetail.cs プロジェクト: Terry-Lin/Xamarin
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            chartview = new TChart();
            chartview.Frame = new RectangleF(0, 0, 320, 460);

            //���ͤ��P�������Ϫ�
            switch (chart)
            {
                case ChartType.Bar:
                    var Barstyle = new Steema.TeeChart.Styles.Bar();
                    Barstyle.FillSampleValues(samples);
                    Barstyle.ShowInLegend = false;
                    Barstyle.Marks.Visible = true;
                    chartview.Series.Add(Barstyle);
                    break;

                case ChartType.Candle:
                    var Candlestyle = new Steema.TeeChart.Styles.Candle();
                    Candlestyle.FillSampleValues(samples);
                    Candlestyle.ShowInLegend = false;
                    Candlestyle.Marks.Visible = true;
                    chartview.Series.Add(Candlestyle);
                    break;

                case ChartType.Bubble:
                    var Bubblestyle = new Steema.TeeChart.Styles.Bubble();
                    Bubblestyle.FillSampleValues(samples);
                    Bubblestyle.ShowInLegend = false;
                    Bubblestyle.Marks.Visible = true;
                    chartview.Series.Add(Bubblestyle);
                    break;

                case ChartType.Radar:
                    var Radarstyle = new Steema.TeeChart.Styles.Radar();
                    Radarstyle.FillSampleValues(samples);
                    Radarstyle.ShowInLegend = false;
                    Radarstyle.Marks.Visible = true;
                    chartview.Series.Add(Radarstyle);
                    break;

                case ChartType.Tower:
                    var Towerstyle = new Steema.TeeChart.Styles.Tower();
                    Towerstyle.FillSampleValues(samples);
                    Towerstyle.ShowInLegend = false;
                    Towerstyle.Marks.Visible = true;
                    chartview.Series.Add(Towerstyle);
                    break;
            }
            View.AddSubview(chartview);
        }