Li-Ion charging ic with 5V input and battery voltage between 3.9V and 3.6V
This is a placeholder for a more detailed answer once the question is sorted out.
I'm posting it like this to ensure I'll be able to expand it in due course.

The intention has merit BUT that graph has essentially nothing to do with what you said or think it does. That is related to discharge voltage and charge voltage has its own set of rules and reason. Read my answer here CAREFULLY, look at Table 4 (at the end) and the 1st graph. That will tell you what you want to do. Then we can discuss how. Ask again when ready. If you have not read the above and somewhat understood it then there will be no point in proceeding.

These excellent graphs and tables are from this Battery University page. Read it too. The graph and table 4 are of most use to you.