@@ -2105,6 +2105,81 @@ public static PlotModel DrawMultilineText()
21052105 return plot ;
21062106 }
21072107
2108+ [ Example ( "#1441: Zero crossing quadrant axes disappear on zoom and pan" ) ]
2109+ public static PlotModel ZeroCrossingQuadrantAxes ( )
2110+ {
2111+ var plot = new PlotModel ( ) { Title = "Zoom or Pan axes to make them disappear" } ;
2112+
2113+ var xaxis = new LinearAxis
2114+ {
2115+ Position = AxisPosition . Top ,
2116+ PositionTier = 0 ,
2117+ AxislineStyle = LineStyle . Solid ,
2118+ Minimum = 0 ,
2119+ AxislineColor = OxyColors . Red ,
2120+ StartPosition = 0.5 ,
2121+ EndPosition = 1 ,
2122+ PositionAtZeroCrossing = true ,
2123+ AbsoluteMinimum = 0 ,
2124+ Title = "ABC" ,
2125+
2126+ } ;
2127+ plot . Axes . Add ( xaxis ) ;
2128+
2129+ var xaxis2 = new LinearAxis
2130+ {
2131+ Position = AxisPosition . Top ,
2132+ PositionTier = 0 ,
2133+ AxislineStyle = LineStyle . Solid ,
2134+ Minimum = 0 ,
2135+ AxislineColor = OxyColors . Gold ,
2136+ StartPosition = 0.5 ,
2137+ EndPosition = 0 ,
2138+ PositionAtZeroCrossing = true ,
2139+ IsAxisVisible = true ,
2140+ AbsoluteMinimum = 0 ,
2141+ Title = "DCS" ,
2142+
2143+ } ;
2144+ plot . Axes . Add ( xaxis2 ) ;
2145+
2146+ var yaxis = new LinearAxis
2147+ {
2148+ Position = AxisPosition . Left ,
2149+ AxislineStyle = LineStyle . Solid ,
2150+ Minimum = 0 ,
2151+ AxislineColor = OxyColors . Green ,
2152+ PositionTier = 0 ,
2153+ StartPosition = 0.5 ,
2154+ EndPosition = 1 ,
2155+ PositionAtZeroCrossing = true ,
2156+ AbsoluteMinimum = 0 ,
2157+ AbsoluteMaximum = 1000 ,
2158+ Title = "DSDC" ,
2159+
2160+ } ;
2161+ plot . Axes . Add ( yaxis ) ;
2162+
2163+ var yaxis2 = new LinearAxis
2164+ {
2165+ Position = AxisPosition . Right ,
2166+ AxislineStyle = LineStyle . Solid ,
2167+ Minimum = 0 ,
2168+ AxislineColor = OxyColors . Violet ,
2169+ PositionTier = 0 ,
2170+ StartPosition = 0.5 ,
2171+ EndPosition = 0 ,
2172+ PositionAtZeroCrossing = true ,
2173+ AbsoluteMinimum = 0 ,
2174+
2175+ } ;
2176+ plot . Axes . Add ( yaxis2 ) ;
2177+
2178+ plot . PlotAreaBorderThickness = new OxyThickness ( 1 , 1 , 1 , 1 ) ;
2179+
2180+ return plot ;
2181+ }
2182+
21082183 private class TimeSpanPoint
21092184 {
21102185 public TimeSpan X { get ; set ; }
0 commit comments