Need help creating a graph for my rain sensor

Hi,

I made a rain sensor with a NodeMCU and a MH-RD sensor.
Now my graphs show the actual value of the voltage like this:

Could you help me make the code to show 0 when’s not raining and some variable value if its raining?
I will adjust the ammount of aprox. rain when it rains…

Thanks!!

Someone, please?