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.
A quick disclaimer...
Although I put in a great effort into researching all the topics I cover, mistakes can happen.
If you spot something out of place, please do let me know.
All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle).
Use of any information contained in this blog post/article is subject to this disclaimer
Other posts you may like...