views:

407

answers:

2

Does anybody know of a Javascript chart API that will handle scaling and labeling for date values on both axes? It looks like I'll have to do manual client-side calculations for labels if I want to use Google Chart API.

My data set is potentially sparse in the dates on either axis, so intelligent labeling calculations would save me a bunch of hassle. Thanks in advance!

+4  A: 

You may wish to look into flot for a JavaScript chart API. (I do not know if it will handle your specific labeling issue.)

Julien Chastang
http://code.google.com/p/flot/source/browse/trunk/API.txt - See "Customizing the legend"It looks like you can pass in your own data point -> label function. Shouldn't be a problem.
Brendan Kidwell
For the git-inclined, I have a pretty active fork of flot on GitHub. When I started it the iola guys hadn't touched the official version in several months. GitHub makes keeping the project alive a lot easier. Cheers.
thenduks
It does automatically scale the axes, even when they are timestamp-based.
cdleary
+1  A: 

Take a look at Google Chart API. I've never used it but I've seen people use it. According to the examples in the docs, you can put date labels on the axes.

Brendan Kidwell
I mentioned in the question that I'm using the Google Chart API -- for sparse dates the labeling calculations are a good bit of work. I'm looking for something that will do it for me.
cdleary
I'm stupid. Sorry about that.
Brendan Kidwell