You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Source/Examples/ExampleLibrary/Issues/Issues.cs
+20-13Lines changed: 20 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ namespace ExampleLibrary
13
13
usingSystem.Collections.Generic;
14
14
usingSystem.Globalization;
15
15
usingSystem.Threading;
16
+
usingSystem.Threading.Tasks;
16
17
17
18
usingOxyPlot;
18
19
usingOxyPlot.Annotations;
@@ -774,23 +775,29 @@ public static PlotModel LabelPlacementCategoryAxisWhenAxisAngleIs45()
774
775
vartextAnnotation=newTextAnnotation(){Text="Hold mouse button here to increase angle",TextPosition=newDataPoint(0,6),TextHorizontalAlignment=HorizontalAlignment.Left,TextVerticalAlignment=VerticalAlignment.Top};
775
776
plotModel1.Annotations.Add(textAnnotation);
776
777
777
-
Timert=newTimer(o =>
778
-
{
779
-
// Angles are the same for all axes.
780
-
doubleangle=0;
778
+
varabort=newManualResetEvent(false);
781
779
782
-
foreach(varaxisinplotModel1.Axes)
780
+
Actionaction=()=>
781
+
{
782
+
do
783
783
{
784
-
angle=(axis.Angle+181)%360-180;
785
-
axis.Angle=angle;
786
-
}
784
+
// Angles are the same for all axes.
785
+
doubleangle=0;
787
786
788
-
plotModel1.Subtitle=string.Format("Current angle is {0}",angle);
789
-
plotModel1.InvalidatePlot(false);
790
-
},null,-1,50);
787
+
foreach(varaxisinplotModel1.Axes)
788
+
{
789
+
angle=(axis.Angle+181)%360-180;
790
+
axis.Angle=angle;
791
+
}
792
+
793
+
plotModel1.Subtitle=string.Format("Current angle is {0}",angle);
0 commit comments