According to the
Terms of Service, you cannot download the API to local storage; you must link to Google's servers every time.
The options you use are almost exactly correct, you just need a few changes:
1) the font size is controlled by vAxis.textStyle.fontSize, not vAxis.fontSize
2) the default strokeWidth for the background is 0, so you need to set it to something larger
Your options should look something like this:
var options2 = {
width: 800,
height: 300,
hAxis: {
slantedTextAngle: 90,
maxTextLines: 2,
minTextSpacing: 5
},
vAxis: {
textStyle: {
fontSize: 5
}
},
backgroundColor: {
stroke: '#DFA',
strokeWidth: 5
}
};
As regard the hAxis.slantedTextAngle/maxTextLines/minTextSpacing options, from what I have observed, these are applied only when the API determines that they are needed. First, the API tries to draw the axis values horizontally; if they are closer together than hAxis.minTextSpacing, the API splits individual labels into more lines, limited by hAxis.maxTextLines and the amount of available space; if they don't fit, it moves labels to different lines, limited by hAxis.maxAlternation and the amount of available space; if it still can't fit them all, then it draws them on an angle as determined by hAxis.slantedTextAngle. I could be wrong about the exact order, but this seems to be the process. I suspect that at each level, some options are given higher priority than others (ie, if you set slantedTextAngle to 90 and minTextSpacing to 100, you will probably get vertical labels that are closer than 100 pixels to each other, assuming your chart isn't so large that data points are 100+ pixels apart).