Historical graph for XIRR and (accumulated) income

I am using Portfolio Performance for both crowdlending and regular investments. Is there a way to generate graphs of the following?

Or is there any like PHP-scripts starter scripts where it is possible to create myself?