Sandeep Mane
Sandeep Mane

Reputation: 223

Remove the black Box around the Chart in MPAndroidChart

I want remove the black border of the chart.
I am working on that for 2 days, but still not able to get rid of that.
enter image description here

Upvotes: 0

Views: 1927

Answers (2)

Kroha
Kroha

Reputation: 168

In kotlin

 chart.axisRight.apply {
        setDrawGridLines(false)
        setDrawLabels(false)
        setDrawAxisLine(false)
    }
    chart.axisLeft.apply {
        setDrawGridLines(false)
        setDrawLabels(false)
        setDrawAxisLine(false)
    }
    chart.xAxis.apply {
        setDrawGridLines(false)
        setDrawLabels(false)
        setDrawAxisLine(false)
    }
    chart.setDrawGridBackground(false)
    chart.setDrawBorders(false)

Upvotes: 3

Virthuss
Virthuss

Reputation: 3213

This is explained on the related github :) The following statements allow you to hide some parts of the chart, including the one you are talking about.

chart.setDrawGridBackground(false);
xAxis.setDrawGridLines(false);
xAxis.setDrawAxisLine(false);
yAxisleft.setDrawGridLines(false);
yAxisleft.setDrawAxisLine(false);
yAxisright.setDrawGridLines(false);
yAxisright.setDrawAxisLine(false);

Upvotes: 4

Related Questions