当前位置: 首页>>代码示例>>C#>>正文


C# TKChart.AddSeries方法代码示例

本文整理汇总了C#中TKChart.AddSeries方法的典型用法代码示例。如果您正苦于以下问题:C# TKChart.AddSeries方法的具体用法?C# TKChart.AddSeries怎么用?C# TKChart.AddSeries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TKChart的用法示例。


在下文中一共展示了TKChart.AddSeries方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ViewDidLoad

		public override void ViewDidLoad ()
		{
			this.AddOption ("Sequential animation", applySequential);
			this.AddOption ("Grow animation", applyGrow);

			base.ViewDidLoad ();

			chart = new TKChart (this.View.Bounds);
			chart.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
			chart.AllowAnimations = true;
			chart.Delegate = chartDelegate;
			this.View.AddSubview (chart);

			Random r = new Random ();
			List<TKChartDataPoint> list = new List<TKChartDataPoint> ();
			for (int i = 0; i < 10; i++) {
				list.Add (new TKChartDataPoint(new NSNumber(i), new NSNumber(r.Next() % 100)));
			}
			
			TKChartLineSeries lineSeries = new TKChartLineSeries (list.ToArray ());
			chart.AddSeries (lineSeries);

			float shapeSize = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone ? 14 : 17;
			lineSeries.Style.PointShape = new TKPredefinedShape (TKShapeType.Circle, new SizeF (shapeSize, shapeSize));
			lineSeries.Style.ShapeMode = TKChartSeriesStyleShapeMode.AlwaysShow;
			lineSeries.SelectionMode = TKChartSeriesSelectionMode.DataPoint;
			chart.AddSeries (lineSeries);
		}
开发者ID:tremors,项目名称:ios-sdk,代码行数:28,代码来源:CustomAnimationLineChart.cs

示例2: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            TKChart chart = new TKChart (this.ExampleBounds);
            chart.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            this.View.AddSubview (chart);

            Random r = new Random ();
            List<CustomObject> data = new List<CustomObject> ();
            for (int i = 0; i < 5; i++) {
                CustomObject obj = new CustomObject () {
                    ObjectID = i,
                    Value1 = r.Next (100),
                    Value2 = r.Next (100),
                    Value3 = r.Next (100)
                };
                data.Add (obj);
            }

            chart.AddSeries (new TKChartAreaSeries (data.ToArray(), "ObjectID", "Value1"));
            chart.AddSeries (new TKChartAreaSeries (data.ToArray(), "ObjectID", "Value2"));
            chart.AddSeries (new TKChartAreaSeries (data.ToArray(), "ObjectID", "Value3"));

            TKChartStackInfo stackInfo = new TKChartStackInfo (new NSNumber (1), TKChartStackMode.Stack);
            for (int i = 0; i < chart.Series.Length; i++) {
                TKChartSeries series = chart.Series [i];
                series.SelectionMode = TKChartSeriesSelectionMode.Series;
                series.StackInfo = stackInfo;
            }

            chart.ReloadData ();
        }
开发者ID:sudipnath,项目名称:ios-sdk,代码行数:33,代码来源:BindWithCustomObject.cs

示例3: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            TKChart chart = new TKChart ();
            chart.Frame = this.ExampleBounds;
            chart.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            chart.AllowPanDeceleration = true;
            this.View.AddSubview (chart);

            Random r = new Random ();
            List<TKChartDataPoint> list = new List<TKChartDataPoint> ();
            for (int i = 0; i < 200; i++) {
                list.Add (new TKChartDataPoint(new NSNumber(r.Next() % 200), new NSNumber(r.Next() % 1000)));
            }
            chart.AddSeries (new TKChartScatterSeries (list.ToArray()));

            list = new List<TKChartDataPoint> ();
            for (int i = 0; i < 200; i++) {
                list.Add (new TKChartDataPoint(new NSNumber(r.Next() % 200), new NSNumber(r.Next() % 1000)));
            }
            chart.AddSeries (new TKChartScatterSeries (list.ToArray()));

            list = new List<TKChartDataPoint> ();
            for (int i = 0; i < 200; i++) {
                list.Add (new TKChartDataPoint(new NSNumber(r.Next() % 200), new NSNumber(r.Next() % 1000)));
            }

            chart.AddSeries (new TKChartScatterSeries (list.ToArray()));

            chart.XAxis.AllowZoom = true;
            chart.XAxis.AllowPan = true;
            chart.YAxis.AllowZoom = true;
            chart.YAxis.AllowPan = true;
        }
开发者ID:sudipnath,项目名称:ios-sdk,代码行数:35,代码来源:PanZoom.cs

示例4: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            chart = new TKChart (this.ExampleBounds);
            chart.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth;
            chart.Delegate = new ChartDelegate (0, 3);
            this.View.AddSubview (chart);

            int[] values = new int[] { 58, 59, 61, 64, 66, 69, 72, 72, 69 };
            int[] values1 = new int[] { 42, 44, 47, 51, 56, 61, 62, 64, 62 };
            List<TKChartDataPoint> dataPoints = new List<TKChartDataPoint> ();
            List<TKChartDataPoint> dataPoints1 = new List<TKChartDataPoint> ();
            for (int i = 0; i < values.Length; i++) {
                TKChartDataPoint point = new TKChartDataPoint (new NSNumber (i), new NSNumber (values [i]));
                TKChartDataPoint point1 = new TKChartDataPoint (new NSNumber (i), new NSNumber (values1 [i]));
                dataPoints.Add (point);
                dataPoints1.Add (point1);
            }

            TKChartLineSeries lineSeries = new TKChartLineSeries (dataPoints.ToArray ());
            lineSeries.SelectionMode = TKChartSeriesSelectionMode.DataPoint;
            lineSeries.Style.PointShape = new TKPredefinedShape (TKShapeType.Circle, new SizeF (8, 8));
            lineSeries.Style.PointLabelStyle.TextHidden = false;
            lineSeries.Style.PointLabelStyle.LabelOffset = new UIOffset (0, -24);
            lineSeries.Style.PointLabelStyle.Insets = new UIEdgeInsets (-1, -5, -1, -5);
            lineSeries.Style.PointLabelStyle.LayoutMode = TKChartPointLabelLayoutMode.Manual;
            lineSeries.Style.PointLabelStyle.Font = UIFont.SystemFontOfSize (10);
            lineSeries.Style.PointLabelStyle.TextAlignment = UITextAlignment.Center;
            lineSeries.Style.PointLabelStyle.TextColor = UIColor.White;
            lineSeries.Style.PointLabelStyle.Fill = new TKSolidFill (new UIColor ((float)(108 / 255.0), (float)(181 / 255.0), (float)(250 / 255.0), (float)1.0));
            lineSeries.Style.PointLabelStyle.ClipMode = TKChartPointLabelClipMode.Hidden;

            TKChartLineSeries lineSeries1 = new TKChartLineSeries (dataPoints1.ToArray ());
            lineSeries1.SelectionMode = TKChartSeriesSelectionMode.DataPoint;
            lineSeries1.Style.PointShape = new TKPredefinedShape (TKShapeType.Circle, new SizeF (8, 8));
            lineSeries1.Style.PointLabelStyle.TextHidden = false;
            lineSeries1.Style.PointLabelStyle.LabelOffset = new UIOffset (0, -24);
            lineSeries1.Style.PointLabelStyle.Insets = new UIEdgeInsets (-1, -5, -1, -5);
            lineSeries1.Style.PointLabelStyle.LayoutMode = TKChartPointLabelLayoutMode.Manual;
            lineSeries1.Style.PointLabelStyle.Font = UIFont.SystemFontOfSize (10);
            lineSeries1.Style.PointLabelStyle.TextAlignment = UITextAlignment.Center;
            lineSeries1.Style.PointLabelStyle.TextColor = UIColor.White;
            lineSeries1.Style.PointLabelStyle.Fill = new TKSolidFill (new UIColor ((float)(241 / 255.0), (float)(140 / 255.0), (float)(133 / 255.0), (float)1.0));
            lineSeries1.Style.PointLabelStyle.ClipMode = TKChartPointLabelClipMode.Hidden;

            TKChartNumericAxis yAxis = new TKChartNumericAxis (new NSNumber (40), new NSNumber (80));
            yAxis.MajorTickInterval = new NSNumber (10);
            chart.YAxis = yAxis;

            chart.AddSeries (lineSeries);
            chart.AddSeries (lineSeries1);
        }
开发者ID:nikolay-diyanov,项目名称:ios-sdk,代码行数:53,代码来源:CustomPointLabels.cs

示例5: ViewDidLoad

		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			chart = new TKChart (this.View.Bounds);
			chart.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth;
			chart.Delegate = chartDelegate;
			this.View.AddSubview (chart);

			Random r = new Random ();
			List<TKChartDataPoint> dataPoints = new List<TKChartDataPoint> ();
			for (int i = 0; i < 10; i++) {
				TKChartDataPoint point = new TKChartDataPoint (new NSNumber (i), new NSNumber (r.Next () % 100));
				dataPoints.Add (point);
			}

			TKChartColumnSeries columnSeries = new TKChartColumnSeries (dataPoints.ToArray ());
			columnSeries.SelectionMode = TKChartSeriesSelectionMode.DataPoint;
			columnSeries.Style.PointLabelStyle.TextHidden = false;
			columnSeries.Style.PointLabelStyle.LayoutMode = TKChartPointLabelLayoutMode.Manual;
			columnSeries.Style.PointLabelStyle.LabelOffset = new UIOffset (0, -10);
			columnSeries.Style.PointLabelStyle.Insets = new UIEdgeInsets (-1, -5, -1, -5);
			columnSeries.Style.PointLabelStyle.Font = UIFont.SystemFontOfSize (10);
			columnSeries.Style.PointLabelStyle.TextAlignment = UITextAlignment.Center;
			columnSeries.Style.PointLabelStyle.ClipMode = TKChartPointLabelClipMode.Visible;
			columnSeries.Style.PointLabelStyle.TextColor = UIColor.White;
			columnSeries.Style.PointLabelStyle.Fill = new TKSolidFill (new UIColor ((float)(108 / 255.0), (float)(181 / 255.0), (float)(250 / 255.0), (float)1.0));

			chart.AddSeries (columnSeries);
			chart.Select (new TKChartSelectionInfo (chart.Series [0], 3));
		}
开发者ID:tremors,项目名称:ios-sdk,代码行数:30,代码来源:CustomPointLabelRender.cs

示例6: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            TKChart chart = new TKChart (this.ExampleBounds);
            chart.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            this.View.AddSubview (chart);

            Random r = new Random ();
            for (int i = 0; i < 2; i++) {
                List<TKChartDataPoint> list = new List<TKChartDataPoint> ();
                for (int j = 0; j < 20; j++) {

                    list.Add(new TKChartDataPoint (new NSNumber (r.Next() % 1450), new NSNumber (r.Next () % 150)));
                }

                TKChartScatterSeries series = new TKChartScatterSeries (list.ToArray());
                series.Title = string.Format ("Series: {0}", list);
                if (2 == i) {
                    series.SelectionMode = TKChartSeriesSelectionMode.DataPoint;
                } else {
                    series.SelectionMode = TKChartSeriesSelectionMode.Series;
                }
                series.Style.PaletteMode = TKChartSeriesStylePaletteMode.UseItemIndex;
                series.MarginForHitDetection = 300;
                chart.AddSeries (series);
            }
            chart.EndUpdates ();
            chart.XAxis.AllowZoom = true;
            chart.YAxis.AllowZoom = true;
        }
开发者ID:sudipnath,项目名称:ios-sdk,代码行数:31,代码来源:ScatterChart.cs

示例7: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            TKChart chart = new TKChart (this.ExampleBounds);
            chart.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            this.View.AddSubview (chart);

            Random r = new Random ();
            List<TKChartDataPoint> list = new List<TKChartDataPoint> ();
            string[] categories = new []{"Apple", "Google", "Microsoft", "Samsung"};
            for (int i = 0; i < categories.Length; i++) {
                list.Add(new TKChartDataPoint(new NSString(categories[i]), new NSNumber(r.Next() % 100)));
            }

            TKChartColumnSeries series = new TKChartColumnSeries (list.ToArray());
            series.SelectionMode = TKChartSeriesSelectionMode.Series;

            TKChartCategoryAxis xAxis = new TKChartCategoryAxis ();
            xAxis.Position = TKChartAxisPosition.Bottom;
            xAxis.PlotMode = TKChartAxisPlotMode.BetweenTicks;
            chart.XAxis = xAxis;

            TKChartNumericAxis yAxis = new TKChartNumericAxis (new NSNumber (0), new NSNumber (100));
            yAxis.Position = TKChartAxisPosition.Left;
            chart.YAxis = yAxis;

            chart.AddSeries (series);
        }
开发者ID:sudipnath,项目名称:ios-sdk,代码行数:29,代码来源:CategoricalAxis.cs

示例8: ViewDidLoad

		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			TKChart chart = new TKChart (this.View.Bounds);
			chart.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
			this.View.AddSubview (chart);

			var xAxis = new TKChartDateTimeCategoryAxis ();
			var formatter = new NSDateFormatter ();
			formatter.DateFormat = "d MMM";
			xAxis.LabelFormatter = formatter;
			xAxis.Style.MajorTickStyle.TicksOffset = -3;
			xAxis.Style.MajorTickStyle.TicksHidden = false;
			xAxis.Style.MajorTickStyle.TicksWidth = 1.5f;
			xAxis.Style.MajorTickStyle.TicksFill = new TKSolidFill (new UIColor (203 / 255.0f, 203 / 255.0f, 203 / 255.0f, 1f));
			xAxis.Style.MajorTickStyle.MaxTickClippingMode = TKChartAxisClippingMode.Visible;
			xAxis.PlotMode = TKChartAxisPlotMode.BetweenTicks;

			var yAxis = new TKChartNumericAxis (new NSNumber(320), new NSNumber(360));
			yAxis.MajorTickInterval = 20;

			var series = new TKChartCandlestickSeries(StockDataPoint.LoadStockPoints(10).ToArray());
			series.GapLength = 0.6f;
			series.XAxis = xAxis;
			chart.YAxis = yAxis;

			chart.AddSeries (series);
		}
开发者ID:tremors,项目名称:ios-sdk,代码行数:29,代码来源:DateTimeCategoryAxis.cs

示例9: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            TKChart chart = new TKChart (this.ExampleBounds);
            chart.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            this.View.AddSubview (chart);

            Random r = new Random ();
            for (int i = 0; i < 2; i++) {
                List<TKChartDataPoint> list = new List<TKChartDataPoint> ();
                for (int j = 0; j < 20; j++) {
                    list.Add(new TKChartDataPoint(new NSNumber(r.Next() % 1450), new NSNumber(r.Next() % 150)));
                }
                chart.AddSeries (new TKChartScatterSeries (list.ToArray()));
            }

            chart.AddAnnotation (new TKChartGridLineAnnotation(new NSNumber(80), chart.YAxis, new TKStroke(UIColor.Red)));
            chart.AddAnnotation (new TKChartGridLineAnnotation(new NSNumber(600), chart.XAxis));
            chart.AddAnnotation (new TKChartBandAnnotation(new TKRange(new NSNumber(10), new NSNumber(40)), chart.YAxis, new TKSolidFill(new UIColor (1, 0, 0, 0.4f)), null));

            TKChartBandAnnotation a = new TKChartBandAnnotation(new TKRange (new NSNumber(900), new NSNumber(1500)), chart.XAxis);
            a.Style.Fill = new TKSolidFill (new UIColor (0, 1, 0, 0.3f));
            chart.AddAnnotation (a);
        }
开发者ID:sudipnath,项目名称:ios-sdk,代码行数:25,代码来源:BandAndLineAnnotations.cs

示例10: ViewDidLoad

		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			TKChart chart = new TKChart (this.View.Bounds);
			chart.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
			this.View.AddSubview (chart);

			Random r = new Random ();
			for (int i = 0; i < 2; i++) {
				List<TKChartBubbleDataPoint> list = new List<TKChartBubbleDataPoint> ();
				for (int j = 0; j < 20; j++) {
					list.Add (new TKChartBubbleDataPoint (new NSNumber (r.Next () % 1450), new NSNumber (r.Next () % 150), new NSNumber (r.Next () % 200)));
				}

				TKChartBubbleSeries series = new TKChartBubbleSeries (list.ToArray());
				series.Title = string.Format("Series {0}", i+1);
				series.Scale = 1.5;
				series.MarginForHitDetection = 2f;
				if (i == 0) {
					series.SelectionMode = TKChartSeriesSelectionMode.DataPoint;
				} else {
					series.SelectionMode = TKChartSeriesSelectionMode.Series;
				}
				chart.AddSeries (series);
			}
		}
开发者ID:tremors,项目名称:ios-sdk,代码行数:27,代码来源:BubbleChart.cs

示例11: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            TKChart chart = new TKChart (this.ExampleBounds);
            chart.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            this.View.AddSubview (chart);

            Random r = new Random ();
            List<TKChartDataPoint> list = new List<TKChartDataPoint> ();
            for (int i = 0; i < 12; i++) {
                list.Add (new TKChartDataPoint (new NSNumber (i), new NSNumber (r.Next () % 2000)));
            }

            TKChartLineSeries series = new TKChartLineSeries (list.ToArray());
            series.SelectionMode = TKChartSeriesSelectionMode.Series;

            TKChartNumericAxis xAxis = new TKChartNumericAxis ();
            xAxis.Range = new TKRange (new NSNumber (0), new NSNumber (11));
            xAxis.Position = TKChartAxisPosition.Bottom;
            xAxis.MajorTickInterval = 1;
            chart.XAxis = xAxis;

            TKChartNumericAxis yAxis = new TKChartNumericAxis ();
            yAxis.Range = new TKRange (new NSNumber (0), new NSNumber (2000));
            yAxis.Position = TKChartAxisPosition.Left;
            yAxis.MajorTickInterval = 400;
            chart.YAxis = yAxis;

            chart.AddSeries (series);
        }
开发者ID:sudipnath,项目名称:ios-sdk,代码行数:31,代码来源:NumericAxis.cs

示例12: ViewDidLoad

		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			TKChart chart = new TKChart (this.View.Bounds);
			chart.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
			this.View.AddSubview (chart);

			string[] months = new string[]{ "Jan", "Feb", "Mar", "Apr", "May", "Jun" };
			int[] values = new int[]{ 95, 40, 55, 30, 76, 34 };
			List<TKChartDataPoint> list = new List<TKChartDataPoint> ();

			for (int i = 0; i < months.Length; i++) {
				list.Add (new TKChartDataPoint(new NSString(months[i]), new NSNumber(values[i])));
			}
			chart.AddSeries (new TKChartAreaSeries (list.ToArray()));

			CALayer layer = new CALayer ();
			layer.Bounds = new RectangleF (0, 0, 100, 100);
			layer.BackgroundColor = new UIColor(1, 0, 0, 0.6f).CGColor;
			layer.ShadowRadius = 10;
			layer.ShadowColor = UIColor.Yellow.CGColor;
			layer.ShadowOpacity = 1;
			layer.CornerRadius = 10;

			TKChartLayerAnnotation a = new TKChartLayerAnnotation(layer, new NSString("Mar"), new NSNumber(80), chart.Series[0]);
			a.ZPosition = TKChartAnnotationZPosition.AboveSeries;
			chart.AddAnnotation(a);
		}
开发者ID:tremors,项目名称:ios-sdk,代码行数:29,代码来源:LayerAnnotation.cs

示例13: ViewDidLoad

		public override void ViewDidLoad ()
		{
			this.AddOption ("pin at top", top);
			this.AddOption ("pin at left", left);
			this.AddOption ("pin at right", right);
			this.AddOption ("pin at bottom", bottom);
			this.AddOption ("floating", floating);

			base.ViewDidLoad ();

			chart = new TKChart (this.View.Bounds);
			chart.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
			this.View.AddSubview (chart);

			Random r = new Random ();
			List<TKChartDataPoint> list1 = new List<TKChartDataPoint> ();
			List<TKChartDataPoint> list2 = new List<TKChartDataPoint> ();
			for (int i = 0; i < 26; i++) {
				list1.Add (new TKChartDataPoint(new NSNumber(i+1), new NSNumber(r.Next(100))));
				list2.Add (new TKChartDataPoint (new NSNumber (i + 1), new NSNumber (r.Next (60))));
			}

			TKChartNumericAxis xAxis = new TKChartNumericAxis(new NSNumber (1), new NSNumber (26));
			xAxis.Position = TKChartAxisPosition.Bottom;
			xAxis.MajorTickInterval = 5;
			chart.AddAxis (xAxis);

			TKChartAreaSeries series = new TKChartAreaSeries (list1.ToArray());
			series.XAxis = xAxis;
			chart.AddSeries (series);

			TKChartAreaSeries series1 = new TKChartAreaSeries (list2.ToArray());
			series1.XAxis = xAxis;
			chart.AddSeries (series1);

			chart.AllowTrackball = true;
			chart.Trackball.SnapMode = TKChartTrackballSnapMode.AllClosestPoints;
			chart.Delegate = chartDelegate;
			chart.Trackball.Tooltip.Style.TextAlignment = UITextAlignment.Left;
		}
开发者ID:tremors,项目名称:ios-sdk,代码行数:40,代码来源:Trackball.cs

示例14: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            TKChart chart = new TKChart ();
            chart.Frame = this.ExampleBounds;
            chart.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            chart.Delegate = new ChartDelegate ();
            this.View.AddSubview (chart);

            Random r = new Random ();
            List<TKChartDataPoint> list1 = new List<TKChartDataPoint> ();
            List<TKChartDataPoint> list2 = new List<TKChartDataPoint> ();
            for (int i = 0; i < 10; i++) {
                list1.Add (new TKChartDataPoint(new NSNumber(i), new NSNumber(r.Next() % 100)));
                list2.Add (new TKChartDataPoint(new NSNumber(i), new NSNumber(r.Next() % 100)));
            }

            TKChartColumnSeries columnSeries = new TKChartColumnSeries (list1.ToArray());
            columnSeries.SelectionMode = TKChartSeriesSelectionMode.Series;
            chart.AddSeries (columnSeries);

            TKChartAreaSeries areaSeries = new TKChartAreaSeries (list2.ToArray());
            areaSeries.Style.PointShape = new TKPredefinedShape (TKShapeType.Star, new SizeF(20, 20));
            areaSeries.Style.ShapeMode = TKChartSeriesStyleShapeMode.AlwaysShow;
            areaSeries.SelectionMode = TKChartSeriesSelectionMode.Series;
            chart.AddSeries (areaSeries);

            chart.YAxis.Style.LabelStyle.Font = UIFont.SystemFontOfSize (18);
            chart.YAxis.Style.LabelStyle.TextColor = UIColor.Black;

            chart.XAxis.Style.LabelStyle.Font = UIFont.SystemFontOfSize (18);
            chart.XAxis.Style.LabelStyle.TextColor = UIColor.Black;

            chart.GridStyle.HorizontalAlternateFill = new TKSolidFill (UIColor.FromWhiteAlpha (0.9f, 0.8f));
        }
开发者ID:sudipnath,项目名称:ios-sdk,代码行数:36,代码来源:Customize.cs

示例15: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            chart = new TKChart (this.ExampleBounds);
            chart.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            this.View.AddSubview (chart);

            Random r = new Random ();
            for (int i = 0; i < 2; i++) {
                List<TKChartDataPoint> list = new List<TKChartDataPoint> ();
                for (int j = 0; j < 20; j++) {
                    list.Add (new TKChartDataPoint(new NSNumber(r.Next() % 1450), new NSNumber(r.Next() % 150)));
                }
                chart.AddSeries (new TKChartScatterSeries (list.ToArray()));
            }
            chart.AddAnnotation (new TKChartCrossLineAnnotation(new NSNumber(900), new NSNumber(60), chart.Series[0]));
        }
开发者ID:sudipnath,项目名称:ios-sdk,代码行数:18,代码来源:CrossLineAnnotation.cs


注:本文中的TKChart.AddSeries方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。