So, so dry
[Permalink] blog code
If you need to check you have ipv6 working correctly, you can try visiting ipv6.offend.me.uk.
Something I've noticed over several years of being involved in web development (directly or indirectly) is that libraries for drawing graphs all suck. A lot. None of them do the things I want in any kind of sensible way.
So what did I do?
I went and wrote one too. It probably sucks as well. You can take a look here.
The features I wanted are:
- Ability to plot points based on
[x,y]coords and not require all points to be present in my data
- i.e. I wanted to be able to supply data with gaps in it, like
[[0, 1], [1, 1], [7, 1]]to plot a "1" at locations 0, 1, and 7
- Take data in the format
[1, 3, 2, 5, 6]and treat it as
[[0, 1], [1, 3], [2, 2], [3, 5], [4, 6]]
- i.e. make life easy for common cases
- Magically work out how many grid lines would be sensible to draw
- Draw labels on those axes
- Either numbers
- or from an array I supply to map those numbers to names
- or from a function I pass in
- Be easy to theme
- On a similar note, set sensible default colours no matter how many data series I have
- Scale nicely to any size
What I've written does all those. It's not the most amazing looking thing ever but, ffs, it's as pretty as others I've used and it's a damn sight easy to work with.
If I wear my contacts for a few hours while coding, they get really dry and I have to take a break. Does anyone else get that? It's like some sort of devious mechanism from health and safety to ensure that I take screen breaks.
It also means I wear my glasses for work more than I intended.