NOTE: This article is 3 years or older so its information may no longer be relevant. Read on at your own discretion! Comments for this article have automatically been locked, refer to the FAQ
for more details.
Here's a small addition to FlatPress. It's a blog activity graph that displays the number of blog posts per month over the past number of months. I got this idea when looking at the Cobertura home page and seeing their commit activity graph.
The height and width of the graph are configurable. By default I left it at 31px high, which allows for a maximum of 1 post per day. The width is based on the number of months, which by default is 12*3 i.e. 36 months or 3 years worth of data.
Here's the raw result followed by what it looks like on my blog itself.
This is the code that makes it possible...
file will generate the graph image, now to use it, simply make an img
element in the html.
Hope you found this post useful...
...so please read on! I love writing articles that provide beneficial information,
tips and examples to my readers. All information on my blog is provided free of
charge and I encourage you to share it as you wish. There is a small favour I ask in return however -
engage in comments below, provide feedback, and if you see mistakes let me know.
If you want to show additional support and help me pay for web hosting and
domain name registration,
donations, no matter how small, are always welcome!
Use of any information contained in this blog post/article is subject to this disclaimer
Other posts you may like...