Skip to content Skip to sidebar Skip to footer

Android - Fill Different Colors Between Two Lines Using Mpandroidchart

following this (Android - Fill the color between two lines using MPAndroidChart) answer I was able to fill with color the space between two lines using AndroidMPChart library. But

Solution 1:

you can try to override the drawLinear in LineChartRender

Solution 2:

This has worked for me:

dataSet.setFillFormatter(newDefaultFillFormatter() {
    @OverridepublicfloatgetFillLinePosition(ILineDataSet dataSet, LineDataProvider dataProvider) {
        return22500;// its value of midel Y line 
    }
});

Post a Comment for "Android - Fill Different Colors Between Two Lines Using Mpandroidchart"