同步操作将从 anysharp/oxyplot 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
// --------------------------------------------------------------------------------------------------------------------// <copyright file="PointAnnotationExamples.cs" company="OxyPlot">// Copyright (c) 2014 OxyPlot contributors// </copyright>// --------------------------------------------------------------------------------------------------------------------namespace ExampleLibrary{using OxyPlot;using OxyPlot.Annotations;using OxyPlot.Axes;[Examples("PointAnnotation"), Tags("Annotations")]public static class PointAnnotationExamples{[Example("PointAnnotation")]public static PlotModel PointAnnotation(){var model = new PlotModel { Title = "PointAnnotation" };model.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom });model.Axes.Add(new LinearAxis { Position = AxisPosition.Left });model.Annotations.Add(new PointAnnotation { X = 50, Y = 50, Text = "P1" });return model;}[Example("PointAnnotation - shapes")]public static PlotModel PointAnnotationShapes(){var model = new PlotModel { Title = "PointAnnotation - shapes" };model.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom, Maximum = 120 });model.Axes.Add(new LinearAxis { Position = AxisPosition.Left });// filledmodel.Annotations.Add(new PointAnnotation{X = 20,Y = 60,Text = "Circle",Shape = MarkerType.Circle,Fill = OxyColors.LightGray,Stroke = OxyColors.DarkGray,StrokeThickness = 1});model.Annotations.Add(new PointAnnotation{X = 40,Y = 60,Text = "Square",Shape = MarkerType.Square,Fill = OxyColors.LightBlue,Stroke = OxyColors.DarkBlue,StrokeThickness = 1});model.Annotations.Add(new PointAnnotation{X = 60,Y = 60,Text = "Triangle",Shape = MarkerType.Triangle,Fill = OxyColors.IndianRed,Stroke = OxyColors.Black,StrokeThickness = 1});model.Annotations.Add(new PointAnnotation{X = 80,Y = 60,Text = "Diamond",Shape = MarkerType.Diamond,Fill = OxyColors.ForestGreen,Stroke = OxyColors.Black,StrokeThickness = 1});model.Annotations.Add(new PointAnnotation{X = 100,Y = 60,Text = "Custom",Shape = MarkerType.Custom,CustomOutline =new[]{new ScreenPoint(-1, -1), new ScreenPoint(1, 1), new ScreenPoint(-1, 1),new ScreenPoint(1, -1)},Stroke = OxyColors.Black,Fill = OxyColors.CadetBlue,StrokeThickness = 1});// not filledmodel.Annotations.Add(new PointAnnotation{X = 20,Y = 40,Text = "Cross",Shape = MarkerType.Cross,Stroke = OxyColors.IndianRed,StrokeThickness = 1});model.Annotations.Add(new PointAnnotation{X = 40,Y = 40,Text = "Plus",Shape = MarkerType.Plus,Stroke = OxyColors.Navy,StrokeThickness = 1});model.Annotations.Add(new PointAnnotation{X = 60,Y = 40,Text = "Star",Shape = MarkerType.Star,Stroke = OxyColors.DarkOliveGreen,StrokeThickness = 1});return model;}[Example("PointAnnotation - text alignments")]public static PlotModel PointAnnotationTextAlignment(){var model = new PlotModel { Title = "PointAnnotation - text alignments" };model.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom, Minimum = -50, Maximum = 50 });model.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Minimum = -50, Maximum = 50 });for (var ha = -1; ha <= 1; ha++){var h = (HorizontalAlignment)ha;for (var va = -1; va <= 1; va++){var v = (VerticalAlignment)va;model.Annotations.Add(new PointAnnotation{X = ha * 20,Y = va * 20,Size = 10,Text = h + "," + v,TextHorizontalAlignment = h,TextVerticalAlignment = v});}}return model;}}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。