'How to draw curved line chart using Canvas Jetpack Compose

Does anyone know how to drawLine with curved every corner using canvas in Jetpack Compose?

I have achieved this using Canvas.drawPoints():

enter image description here

but I want to make every corner to curved something like this:

enter image description here

Very appreciate any helps!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source