实际上我正在尝试删除标签和通向标签的行。该应用程序位于C#中,我使用OxyPlot绘制了饼图。
这是我的代码。你可以看到我尝试的所有东西都没有帮助我。
感谢您的帮助!
public class MyViewModel
{
public PlotModel MyModel { get; set; }
public MyViewModel()
{
SingletonItem singletonItem = SingletonItem.Instance;
PieSeries pieSeries = new PieSeries();
pieSeries.Slices.Add(new PieSlice("Done", singletonItem.Done) {IsExploded = true, Fill = OxyColors.PaleVioletRed});
pieSeries.Slices.Add(new PieSlice("Undone", singletonItem.Undone) {IsExploded = true});
pieSeries.LabelField = "";
pieSeries.TickDistance = 0;
pieSeries.ValueField = "";
MyModel = new PlotModel();
MyModel.IsLegendVisible = false;
MyModel.Series.Add(pieSeries);
}
}
答案 0 :(得分:3)
我自己解决了这个问题。对于每个需要相同信息的人来说,这些帮助有所帮助:
pieSeries.OutsideLabelFormat = "";
pieSeries.TickHorizontalLength = 0.00;
pieSeries.TickRadialLength = 0.00;