删除Android绘图饼图上的分隔线

删除Android绘图饼图上的分隔线,android,charts,pie-chart,androidplot,Android,Charts,Pie Chart,Androidplot,我在应用程序中使用了android plot饼图来绘制数据。我的问题是饼图中的分隔线(见下图)。不管我用什么方法设置图表,我似乎都摆脱不了这条黑线 下面是我如何设置它的: //Sets up the pie chart to display the user beer ratings figures visually private void chartSetup(PieChart p){ PieWidget pw = p.getPieWidget(); pw.setPadd

我在应用程序中使用了android plot饼图来绘制数据。我的问题是饼图中的分隔线(见下图)。不管我用什么方法设置图表,我似乎都摆脱不了这条黑线

下面是我如何设置它的:

//Sets up the pie chart to display the user beer ratings figures visually
private void chartSetup(PieChart p){

    PieWidget pw = p.getPieWidget();

    pw.setPadding(0,0,0,0);

    SegmentFormatter sf1 = new SegmentFormatter();
    sf1.configure(getActivity(),R.xml.pie_segment_formatter1);

    sf1.getFillPaint();

    SegmentFormatter sf2 = new SegmentFormatter();

    sf2.configure(getActivity(), R.xml.pie_segment_formatter2);
    sf2.getFillPaint();

    Segment monthly = new Segment("", totalBeerCount);
    Segment total = new Segment("", monthlyBeerCount);

    p.setPlotMarginBottom(0);

    p.addSegment(monthly, sf1);
    p.addSegment(total, sf2);
    p.redraw();
    p.getBorderPaint().setColor(Color.TRANSPARENT);
    p.getBackgroundPaint().setColor(Color.TRANSPARENT);

    p.getRenderer(PieRenderer.class).setDonutSize(.90f, PieRenderer.DonutMode.PERCENT);
}
下面是两个段格式化程序xml文件:

饼图\u段\u格式化程序1

<?xml version="1.0" encoding="utf-8"?>
<config
    fillPaint.color="@color/appRed"
    labelPaint.textSize="5dp"
    innerEdgePaint.color = "@color/appRed"
    outerEdgePaint.color = "@color/appRed"/>

饼图\u段\u格式化程序2

<?xml version="1.0" encoding="utf-8"?>
<config
    fillPaint.color="@color/lightGrey"
    labelPaint.textSize="5dp"
    innerEdgePaint.color = "@color/lightGrey"
    outerEdgePaint.color = "@color/lightGrey"/>

我已尝试在配置文件中包含
linePaint.strokeWidth=“0dp”
,但这没有任何区别。如果有人能在这方面帮助我,我将不胜感激


您要寻找的是用于绘制径向边的油漆。将此行添加到每个格式化程序xml CFG:

radialEdgePaint.color="#00000000"
或在Java src中以编程方式:

formatter.setRadialEdgePaint(null);

太好了…知道怎么做就容易了!谢谢你