Xamarin - Microcharts 图形和标签

Xamarin - Microcharts Graphics and Label

我正在将此插件用于 Xamarin Forms:
https://github.com/aloisdeniel/Microcharts

Microcharts 很棒,它是迄今为止我见过的最好的显示图表的工具...
BUT... 使用时,有没有办法指定显示标签的位置? 例如,如果我使用 RadialGauge 并且我的标签值或文本很大,它会覆盖图表图形。

现在我正在使用这段代码(在 ChartView 的自定义渲染中)显示标签:

var entry = new List<Microcharts.Entry>();
var dataEntry = new Microcharts.Entry(ValorAtingido);

this.Chart = new Microcharts.RadialGaugeChart();

string myValue = Math.Round(this.ValorAtingido, 1).ToString();
string objective = Math.Round(this.ValorMeta, 1).ToString();

dataEntry.ValueLabel = myValue + " de " + objective + " (" + this.Percent + "%)";
dataEntry.Label = "Novo Teste";
this.Chart.LabelTextSize = 20;   

这段代码的结果是:
那么,有没有一种方法可以选择是否要在图形的顶部、底部、左侧、右侧显示标签?或者类似的东西可以帮助我?

现在,没有一种简单的方法可以做到这一点... 开发人员正在考虑在下一个版本中添加此功能,您可以在这些链接中看到: - https://github.com/aloisdeniel/Microcharts/issues/31 - https://github.com/aloisdeniel/Microcharts/issues/33 - https://github.com/aloisdeniel/Microcharts/issues/28

而且,正如您在问题的评论中看到的那样,另一位用户就如何创建标签给出了很好的提示,您可以使用它进行覆盖并绘制自己的标签。

Placement of label elements is hardcoded in DrawCaptionElements and is based upon the margin. Fork the project and create your public/virtual DrawCaptionElements so you can override it in subclasses... – SushiHangover