I spent most of the day capturing all our fuel slips since we bought our current car (Dec 2007) and then decided to learn about fuel consumption and everything that goes with it. I employed FushionCharts Free again, but found the charts a little dull if I didn’t specify the colour codes.
I remember recently looking for a way to randomise the colour codes, as I pull all my information from an SQL database dynamically, but I didn’t find a workable solution then, and tonight proved pretty fruitless as well. Then I realised that all I needed was a random hex code generator. Or a way to convert random numbers to hex.
I finally pieced bits together, and this is what it looks like:
iCode = ((Int((max-min+1)*Rnd+min))*1677215)
RandomCode = Left(Hex(iCode), 6)
I am rather pleased with the results. Even the line graphs look different with every refresh.
So, this is our fuel consumption for the month to date.
And for the year to date:
Still trying to figure out how to work out how much CO2 we pump into the atmosphere, but I was pretty pleased to discover that our average MPG over the entire period is 33, which I believe is pretty good.