Sentimental
Sentimental

Reputation: 187

How to config "PointLabelFormatter" in androidplot?

Now I'm using androidplot library and meet a problem when I want to change the point labels to transparent. It is easy to change it in java code:

myFormat.setPointLabelFormatter(new PointLabelFormatter(Color.TRANSPARENT));

However, I want to set it in an XML file. In tutorial there are settings about lines and points:

<?xml version="1.0" encoding="utf-8"?>

<config
    linePaint.strokeWidth="3dp"
    linePaint.color="#b35900"
    vertexPaint.color="#b85c2e"
    pointText.color = "#00000000"
    fillPaint.color="#00000000"
    pointLabelFormatter.textPaint.color="#FFFFFF"/>

But there are no attributes about point labels. If I want to add point labels in XML, where can I find the names and attributes of point labels?

Upvotes: 2

Views: 600

Answers (1)

Parvathi Krishnan
Parvathi Krishnan

Reputation: 73

Try this code
<?xml version="1.0" encoding="utf-8"?>
<config
    linePaint.strokeWidth="4dp"
    linePaint.color="#42D236"
    vertexPaint.color="#00AA00"
    fillPaint.color="#00000000"
    pointLabelFormatter.textPaint.strokeWidth="2dp"
    pointLabelFormatter.textPaint.color="#000000" />

Upvotes: 1

Related Questions