yii chart

Hi, I need to create a graphic but I do not want to use a payment like highchart or similar.

I need a complete example. Not an extension pays.

Googlecharts is a good option but when I generate the .png as I keep on the server?

Or how do I send it to the PDF using the MPDF extension?

I thank you in advance for the possible solution to this problem