How to add links in google chart api

前端 未结 5 767
南方客
南方客 2021-01-01 22:43

Can I add links in google chart api?

For example,

\"enter

How could I

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-01 23:28

    Solution: You just need to select the specific selection of chart by:

    google.visualization.events.addListener(table, 'select', function() {
      var row = table.getSelection()[0].row;
      alert('You selected ' + data.getValue(row, 0));
      window.open(data.getValue(row, 0));
    });
    

    Full Example: jsfiddle.net

提交回复
热议问题