I have found a solution for this issue myself.
Already had custom Painter for handleing different color borders in the chart.
And was previously trying to get this to work with a gradient, but didnt get it quite right.
However I found a way that gives the result i was looking for.
In short I have an override on "getStrokePaint", where i add a gradient.CreateShader(),
where the Rect bottom is just a couple px lower than top.
And using the gradient to draw the color.
Something like this:
final gradient = LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [borderColor, Colors.transparent, Colors.transparent],
stops: const [0.0, 0.9, 1],
);
final shortRect = Rect.fromLTRB(
segmentRect.left,
segmentRect.top,
segmentRect.right,
segmentRect.top + 2,
);
Paint()..shader = gradient.createShader(shortRect);