How to draw a translucent gradient effect

What LVGL version are you using?

v8.2

What do you want to achieve?

I need to draw a translucent gradient like the one in the image below, but I don’t need to draw this line chart, just a simple line underneath this effect.
image

What have you tried so far?

It looks like lv_draw_mask_fade_init(), but I don’t know the code.