Point at origin of AreaSeries
Hello all,
Before adopting OxyPlot in our project, we used the example browser of the master branch to see if every feature we required was supported by OxyPlot. One of these features that we needed was drawing areas using a collection of points.
In order to verify whether this was possible, we adapted the example "AreaSeries with default style", so that the CreateExampleAreaSeries would return a looped series of points, by only using the Points collection (Points2 is left untouched).
private static AreaSeries CreateExampleAreaSeries() { var areaSeries1 = new AreaSeries(); areaSeries1.Points.Add(new DataPoint(0.0, 1.1)); areaSeries1.Points.Add(new DataPoint(1.0, 2.1)); areaSeries1.Points.Add(new DataPoint(1.6, 1.6)); areaSeries1.Points.Add(new DataPoint(1.6, 0.5)); areaSeries1.Points.Add(new DataPoint(0.0, 0.5)); areaSeries1.Points.Add(new DataPoint(0.0, 1.1)); return areaSeries1; }
Now we are using the latest version of OxyPlot from NuGet, which is 1.0.0-unstable1953 and we notice that there is a point drawn at the origin. We can reproduce this using the example browser of the latest version and adapting the same example in the same way.
It is possible to work around this issue by adding a point from the Points collection to the Points2 collection.
So I'm wondering whether you can reproduce this and whether it is a bug or intentional?
Screenshot of possible bug:
Thanks in advance.
Сервис поддержки клиентов работает на платформе UserEcho
https://github.com/oxyplot/oxyplot/commit/4858e3d67538de55e8b257d7e13dd7917b0b33d8
Could it help to set ConstantY2 to NaN?
Sorry for the late reply. When setting ConstantY2 to NaN, the area doesn't get a fill color. This can also be seen in the example library.
Perhaps a better solution would be to implement a Custom Series which supports my needs.