
As you can see Two LineChartDataSet with the Gradient fill
Now i want to fill area between Two line .
chartDataSet2.drawFilledEnabled = false in below line but not working the Gradient is still display in below line.Let me know if its possible or not or i have to customize my self.
Well I just met the same task recently.
drawFilledEnabled is just filling the whole rect between the line and the fillMin(usually bottom line or 0 line), so if the color is not solid, it will have overlay.
So there are two options:
Ok second option i have already tried with the high on first and below in second.
Regarding closest path its bit more tricky, in case of user zoom drag etc and may below line gone up from top line the also be the case so in that case higher line become lower and vica versa
Any chance to be done in master Repo?
I write a small sort to make sure the higher line always renders first. If in your case, use can change the order, the higher line will cover the lower line, we can't avoid that.
i am not in hurry with this request but I hope this is good part for this lib, just for curiosity is there any chance of Android lib have implemented same kind of functionality so that we can get help from that ?
The functionality in Android and Swift are the same. That's the point of a cross-platform library
@danielgindi yes mate I totally agree with your point my purpose to point out the Android lib is to know whether somebody have same kind of request or not.
did u find any logic for this?? If so please post it
@BhargaviSridharan Nope
Please see the Filled Line Chart demo on v3 branch
I am using setFillFormatter, but it's not helping me and, setfillColor() crosses the second line as there is no way to stop the first line at Y values of the second line.
I want to implement something like this:
`dataSet.setFillFormatter(new IFillFormatter() {
@Override
public float getFillLinePosition(ILineDataSet dataSet, LineDataProvider dataProvider) {
return //return Y value of the second line for current X of line being filled;
}
});`
Is there any way to find the Y value of the second line for each X of first line? I see both dataSet and dataProvider returns fixed values for each call of getFillLinePosition.
Most helpful comment
I am using setFillFormatter, but it's not helping me and, setfillColor() crosses the second line as there is no way to stop the first line at Y values of the second line.
I want to implement something like this:
Is there any way to find the Y value of the second line for each X of first line? I see both dataSet and dataProvider returns fixed values for each call of getFillLinePosition.