Xamarin Forms:从饼图中删除或隐藏 LinearAxis

Xamarin Forms: Remove or Hide the LinearAxis from the Piechart

如何去除 oxyplot 线性轴线(如图所示的黑色边框线)。

我尝试使用以下代码隐藏轴线的可见性,但轴线仍然可见

代码:

modelP2.Series.Add(seriesP2);
        modelP2.Axes.Add(new LinearAxis() { Position = AxisPosition.Bottom, IsAxisVisible = false, AxislineStyle = LineStyle.None, MinorTicklineColor=OxyColors.Transparent, ExtraGridlineColor =OxyColors.Transparent, MajorGridlineColor=OxyColors.Transparent, MinorGridlineColor =OxyColors.Transparent,TicklineColor=OxyColors.Transparent, AxislineColor =OxyColors.Transparent, TickStyle = TickStyle.None,MinorTickSize = 0, MajorTickSize=0 });
        modelP2.Axes.Add(new LinearAxis() { Position = AxisPosition.Left, IsAxisVisible = false, AxislineStyle = LineStyle.None, MinorTicklineColor = OxyColors.Transparent, ExtraGridlineColor = OxyColors.Transparent , MajorGridlineColor = OxyColors.Transparent, MinorGridlineColor = OxyColors.Transparent, TicklineColor = OxyColors.Transparent, AxislineColor = OxyColors.Transparent, TickStyle = TickStyle.None });
       // modelP2.DefaultXAxis.AxislineColor = OxyColors.White;
        var ta = new TextAnnotation();
        ta.Text = "Label Text";
        ta.TextColor = OxyColors.Black;
        ta.Stroke = OxyColors.Transparent;
        ta.StrokeThickness = 5;
        ta.FontSize = 36;
        ta.TextPosition = new DataPoint(50, 50);
        modelP2.Annotations.Add(ta);

感谢任何帮助!

希望我正确理解了你的问题。恕我直言,这不是导致黑线的轴,而是绘制区域边界。您应该能够将其移除,将颜色更改为透明

modelP2.PlotAreaBorderColor = OxyColors.Transparent;