本文整理汇总了C#中TKChart.Select方法的典型用法代码示例。如果您正苦于以下问题:C# TKChart.Select方法的具体用法?C# TKChart.Select怎么用?C# TKChart.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TKChart
的用法示例。
在下文中一共展示了TKChart.Select方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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));
}