This will probably be an impossible question to answer but I am trying to create a bar chart where the vAxis appear as links to different pages. In example, all the values that will appear in the vAxis are different assets and I want to be able to create a link to each asset's specific report html page. Is it possible to create links and enable them to appear in the chart or would this be completely impossible given the way google has built the chart tool?
I attempted doing this by trying to physically input the javascript code to turn the variable printed into a link but all I'm able to see in the google chart is <a href="http://www.google.com">This</a>. I wanted the word "This" to be a link directly to the google site. Is this possible? Here's an example of what I've done so far: <html> <head> <script type="text/javascript" src="https://www.google.com/ jsapi"></script> <script type="text/javascript"> google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); var aName = "This"; data.addColumn('string', 'hjk'); data.addColumn('number', 'End of Life'); data.addRows([ [aName.link('http://www.google.com'), 1995], ['Is', 2000], ['An', 1999], ['Application', 2002] ]); var options = { width: 400, height: 240, title: 'Company Performance', vAxis: {title: 'Year', titleTextStyle: {color: 'red'}} }; var chart = new google.visualization.BarChart(document.getElementById('chart_div')); chart.draw(data, options); } </script> </head> <body> <div id="chart_div"></div> </body> </html> -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
