How to measure user growth over time?
You can use select count(*), DATE_FORMAT(FROM_UNIXTIME(created),'%m-%Y') as month from users group by MONTH(FROM_UNIXTIME(created));. This uses the created field of the users table. 

Edit:

In your code this should look something like

$result = db_query("SELECT count(*), DATE_FORMAT(FROM_UNIXTIME(created),'%m-%Y') AS month 
                    FROM {users} 
                    GROUP BY MONTH(FROM_UNIXTIME(created))");


This will return all new usercreations grouped by month. You could use other Date/Time Functions like DAY. But be carfull with the groups. The example above only works correct if you track the data of one year (because it does not group by year). Here is a more complex example:

$result = db_query("SELECT count(*), DATE_FORMAT(FROM_UNIXTIME(created),'%d-%m-%Y') AS month 
                    FROM {users} 
                    GROUP BY YEAR(FROM_UNIXTIME(created)),
                             MONTH(FROM_UNIXTIME(created)), 
                             DAY(FROM_UNIXTIME(created))");


I'm not entirely sure if there is a better solution to this. I can't help with the Integration into the charting API as I never used it.