If you must do it yourself and not use a pre-existing package. Start small. Simply create one table that logs each request, who made it, the time, the referer, whatever info you want.
Once you have the data logged, if you still don't want to use something like Google Charts you can try making your own simple PHP charts with css and html.
Bar diagrams can be pretty easy, but require some math to get right. The easiest way is to flip them on their side. You normally see them like buildings, but you want in this case to see them as worm-like tubes. The length of the tube can then represent the number of hits, pageviews, visits, so on.
I would define a fixed width for the whole chart and change the width of the bars to represent a percentage of the max value. So if the max value is 1000, and this bar is 500, you would make the bar 50% of the width of your chart.
I hope this points you in the right direction. Doing something like this can be great for learning new concepts.