Creating graphs updated periodically (daily, weekly, monthly) to see a trend?

How can I create a graph which will be automatically updated every day, week, or month?

Let’s say my query is:

SELECT count(*) FROM users;

Which will produce some number every day. I’d like to see daily graphs for these values (i.e. one graph for the last 14 days, other graph for the last 12 months and so on).