Right now I have the first column "Address & Listings" of the table set to have a hyper link. I would also like to have the the "Neighborhood" column also hyperlinked. I've tried a few things but obviously didnt work out. The code below works. My attempt to make it work is below that.
______________________________________________________________________________________________________________ working code <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load('visualization', '1', {packages: ['table']}); function drawVisualization() { // Create and populate the data table. var data = google.visualization.arrayToDataTable([ ['<b><center>Address & Listings</center></b>', '<b><center>Website</center></b>', '<b><center>Condo</center></b>','<b><center>Neighborhood</center></b>', '<b><center>Year</center></b>','<b><center>Floors</center></b>', '<b><center>Starting Sq.Ft.</center></b>','<b><center>Starting Price</center></b>', '<b><center>Starting Rent</center></b>','<b><center>Starting Fee</center></b>', '<b><center>Heat Incl.</center></b>','<b><center>Hydro Incl.</center></b>', '<b><center>Water Incl.</center></b>'], [{v:1,f:'<center>50 Absolute Ave.</center>'}, '/brampton/20-cherrytree-dr-east/crown-west-condo', '<center>Marilyn Monroe Condo</center>','<center>City Centre Condos</center>','<center>2012</center>', {v:52,f:'<center>52</center>'},{v:650,f:'<center>650</center>'},'<center>$225,000</center>','<center>$1,300</center>','<center>$312</center>','<center>Yes</center>','<center>No</center>','<center>Yes</center>'], ]); // Create and draw the visualization. var table = new google.visualization.Table(document.getElementById('visualization')); var formatter = new google.visualization.TablePatternFormat('<a href={1}>{0}</a>'); formatter.format(data, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,12]); // Apply formatter and set the formatted value of the first column. var view = new google.visualization.DataView(data); view.setColumns([0,2,3,4,5,6,7,8,9,10, 11,12]); // Create a view with the first column only. table.draw(view, {allowHtml: true, showRowNumber: false}); } google.setOnLoadCallback(drawVisualization); </script> <body style="font-family: Arial;border: 0 none;"> <div id="visualization" style="width: 100%; height: 1650px;"></div> </body> </html> <p> <p> ________________________________________________________________________________________________________________________ Not working code excerpt [{v:1,f:'<center>50 Absolute Ave.</center>'}, '/brampton/20-cherrytree-dr-east/crown-west-condo', '<center>Marilyn Monroe Condo</center>','<center>City Centre Condos</center>', '/brampton/20-cherrytree-dr-east/crown-west-condo','<center>2012</center>', {v:52,f:'<center>52</center>'},{v:650,f:'<center>650</center>'},'<center>$225,000</center>','<center>$1,300</center>','<center>$312</center>','<center>Yes</center>','<center>No</center>','<center>Yes</center>'], ]); // Create and draw the visualization. var table = new google.visualization.Table(document.getElementById('visualization')); var formatter = new google.visualization.TablePatternFormat('<a href={1}>{0}</a>'); var formatter = new google.visualization.TablePatternFormat('<a href={4}>{3}</a>'); formatter.format(data, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,12,13]); // Apply formatter and set the formatted value of the first column. var view = new google.visualization.DataView(data); view.setColumns([0,2,3,5,6,7,8,9,10, 11,12,13]); // Create a view with the first column only. table.draw(view, {allowHtml: true, showRowNumber: false}); } google.setOnLoadCallback(drawVisualization); </script> <body style="font-family: Arial;border: 0 none;"> <div id="visualization" style="width: 100%; height: 1650px;"></div> </body> </html> <p> <p> -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
