是否有可能创建一个甜甜圈饼图,如下面所示的xamarin (跨平台),使用矛盾图或任何其他library.If,是的,你能帮助我的链接或例子。我确实找到了实现饼图的解决方案,但无法找到实现甜甜圈饼图的解决方案。
任何帮助都是非常感谢的。
发布于 2018-11-30 12:01:24
通过引用以下链接,我终于找到了我的答案的解决方案:
OxyPlot分段和如何使用xamarin.android中的矛盾图创建甜甜圈图?
public class SalesVM
{
private PlotModel modelP1;
public SalesVM()
{
modelP1 = new PlotModel { Title = "Pie Sample1" };
dynamic seriesP1 = new PieSeries { StrokeThickness = 2.0, InsideLabelPosition = 0.8, AngleSpan = 360, StartAngle = 0, InnerDiameter = 0.8};
seriesP1.Slices.Add(new PieSlice("Africa", 1030) { IsExploded = false, Fill = OxyColors.PaleVioletRed });
seriesP1.Slices.Add(new PieSlice("Americas", 929) { IsExploded = true });
seriesP1.Slices.Add(new PieSlice("Asia", 4157) { IsExploded = true });
seriesP1.Slices.Add(new PieSlice("Europe", 739) { IsExploded = true });
seriesP1.Slices.Add(new PieSlice("Oceania", 35) { IsExploded = true });
modelP1.Series.Add(seriesP1);
}
public PlotModel Model1
{
get { return modelP1; }
set { modelP1 = value; }
}
}
https://stackoverflow.com/questions/53555109
复制相似问题