Quantcast
Channel: OxyPlot (moved to GitHub)
Viewing all articles
Browse latest Browse all 2061

Closed Unassigned: AreaSeries draws on top of other elements when Fill != null [10079]

$
0
0
As the title says, AreaSeries somehow draws on top of other elements when Fill != null. When Fill == null, it works as expected. I modified an example from AreaSeriesExamples.cs to show the problem.

```
[Example("Different stroke colors")]
public static PlotModel DifferentColors()
{
var plotModel1 = new PlotModel("Different stroke colors",
"The line annotation should be on top!");
var areaSeries1 = CreateExampleSeries();
areaSeries1.Color = OxyColors.Red;
areaSeries1.Color2 = OxyColors.Blue;

///////////////////////////////////////////////////////////////
// comment out the line below for correct behavior
areaSeries1.Fill = OxyColors.Yellow;
///////////////////////////////////////////////////////////////

plotModel1.Series.Add(areaSeries1);
var lineAnnotation = new OxyPlot.Annotations.LineAnnotation
{
Type = OxyPlot.Annotations.LineAnnotationType.Vertical,
X = 6
};
plotModel1.Annotations.Add(lineAnnotation);
return plotModel1;
}
```

Comments: Thanks! I found an inconsistency for Wpf.Annotation and Annotation. The default layer should be AnnotationLayer.AboveSeries.

Viewing all articles
Browse latest Browse all 2061

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>