Charts Tip #1

Text Rotation

A simple tip if you want to rotate text in x or y axis in google charts. In this example I am rotating horizontal axis text to 65 degrees. The reason why I am doing this is to create more space for labels and also easier to read.

hAxis: {
 textStyle: {
 fontSize: 11
 },
 direction:-1, 
 slantedText:true, 
 slantedTextAngle:65,
 },

google_charts_pic

Link to fiddle for the working example.

If you want to read more on google charts than click here.

Convert chart to Image

Google chart also can be converted into images. If you want to print your google charts or link to other pages can just convert into image.

 google.visualization.events.addListener(chart, 'ready', function () {
 var imgUri = chart.getImageURI();
 // do something with the image URI, like:
 document.getElementById('chartImg').src = imgUri;
 });

Further information can be obtain from google site.

Happy days!!!!