Hey guys!
I love the chart API and have been using it for ages. Until today, though, it has primarily been through use of the good ol' Image Charts API, and following the deprecation of that a month ago, I thought I'd step into the new world of interactive charts. I'm happy with it, and nearly everything transitions perfectly over, except for one thing: manual labels on axes. Case in point, here's an area chart of track plays per day I'm making for a site, comparing the old with the new version:
I decided a while ago only to have a label for every month, for simplicity. I could easily handle generating the position of the required labels myself. The old Image Charts API gave me the CHXL and CHXP arguments which could control the label values and label positions on the X-axis. There's always the possibility I'm missing some option somewhere (and I really hope that's the case), but what I've found seems like the new Interactive Charts majorly dumb down this aspect, giving no control and only five (or maybe more, if I'm feeling lucky) evenly spaced randomly placed labels. As they are, marking up random dates doesn't really contribute much to the visualisation.
The X-axis is a "continuous" axis with a "date" datatype, so apparently this is why this is occuring. I tried changing to a "discrete" axis by changing the dates to strings, which resulted in even weirder labels (showing every date and truncating it "2012...", or showing every Xth label more or less randomly dependent on the starting date). And if I use such an axis I can't get the visual dividers on the labels for some reason.
I tried using the "format" option by setting it to month and year only ("MMMM y"), which only resulted in four consecutive labels saying the same thing. Definitely not intended usage.
What gives? Is there some magic feature I can't find somewhere? Or has custom axis control simply been down-prioritized? Or is there some other alternative strategy I'm supposed to use? I'd love to get control over every visual part of my chart, including this.
Nonetheless, thanks to the team at Google for a wonderful product I've used for many years. Visualization rocks!
Andy