| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,19 @@ | |||
| 1 | + namespace ExampleGenerator.Annotations | ||
| 2 | + { | ||
| 3 | + using OxyPlot; | ||
| 4 | + using OxyPlot.Annotations; | ||
| 5 | + using OxyPlot.Axes; | ||
| 6 | + | ||
| 7 | + public class EllipseAnnotationExamples | ||
| 8 | + { | ||
| 9 | + [Export("Annotations/EllipseAnnotation")] | ||
| 10 | + public static PlotModel EllipseAnnotation() | ||
| 11 | + { | ||
| 12 | + var model = new PlotModel { Title = nameof(EllipseAnnotation) }; | ||
| 13 | + model.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom }); | ||
| 14 | + model.Axes.Add(new LinearAxis { Position = AxisPosition.Left }); | ||
| 15 | + model.Annotations.Add(new EllipseAnnotation { X = 50, Y = 50, Height= 30 , Width = 30, Text = nameof(EllipseAnnotation) }); | ||
| 16 | + return model; | ||
| 17 | + } | ||
| 18 | + } | ||
| 19 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,19 @@ | |||
| 1 | + namespace ExampleGenerator.Annotations | ||
| 2 | + { | ||
| 3 | + using OxyPlot; | ||
| 4 | + using OxyPlot.Annotations; | ||
| 5 | + using OxyPlot.Axes; | ||
| 6 | + | ||
| 7 | + public class RectangleAnnotationExamples | ||
| 8 | + { | ||
| 9 | + [Export("Annotations/RectangleAnnotation")] | ||
| 10 | + public static PlotModel RectangleAnnotation() | ||
| 11 | + { | ||
| 12 | + var model = new PlotModel { Title = nameof(RectangleAnnotation) }; | ||
| 13 | + model.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom }); | ||
| 14 | + model.Axes.Add(new LinearAxis { Position = AxisPosition.Left }); | ||
| 15 | + model.Annotations.Add(new RectangleAnnotation { MinimumX = 30, MaximumX = 70, MinimumY = 40, MaximumY = 60, Text = nameof(RectangleAnnotation) }); | ||
| 16 | + return model; | ||
| 17 | + } | ||
| 18 | + } | ||
| 19 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,19 @@ | |||
| 1 | + namespace ExampleGenerator.Annotations | ||
| 2 | + { | ||
| 3 | + using OxyPlot; | ||
| 4 | + using OxyPlot.Annotations; | ||
| 5 | + using OxyPlot.Axes; | ||
| 6 | + | ||
| 7 | + public class TextAnnotationExamples | ||
| 8 | + { | ||
| 9 | + [Export("Annotations/TextAnnotation")] | ||
| 10 | + public static PlotModel TextAnnotation() | ||
| 11 | + { | ||
| 12 | + var model = new PlotModel { Title = nameof(TextAnnotation) }; | ||
| 13 | + model.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom }); | ||
| 14 | + model.Axes.Add(new LinearAxis { Position = AxisPosition.Left }); | ||
| 15 | + model.Annotations.Add(new TextAnnotation { TextPosition = new DataPoint(50,50), Text = nameof(TextAnnotation) }); | ||
| 16 | + return model; | ||
| 17 | + } | ||
| 18 | + } | ||
| 19 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -49,7 +49,10 @@ | |||
| 49 | 49 | <Reference Include="System.Drawing" /> | |
| 50 | 50 | </ItemGroup> | |
| 51 | 51 | <ItemGroup> | |
| 52 | + <Compile Include="Annotations\EllipseAnnotationExamples.cs" /> | ||
| 52 | 53 | <Compile Include="Annotations\LineAnnotationExamples.cs" /> | |
| 54 | + <Compile Include="Annotations\RectangleAnnotationExamples.cs" /> | ||
| 55 | + <Compile Include="Annotations\TextAnnotationExamples.cs" /> | ||
| 53 | 56 | <Compile Include="Axes\AxisExamples.cs" /> | |
| 54 | 57 | <Compile Include="Axes\DateTimeAxisExamples.cs" /> | |
| 55 | 58 | <Compile Include="Axes\LinearAxisExamples.cs" /> | |
@@ -89,4 +92,4 @@ | |||
| 89 | 92 | <Target Name="AfterBuild"> | |
| 90 | 93 | </Target> | |
| 91 | 94 | --> | |
| 92 | - </Project> | ||
| 95 | + </Project> | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments