I want to hide the value of pie chart slices in the tooltip. I found
the property 'tooltip.text' in the JavaScript doc for PieChart. Here
is the JavaScript example I modified to work as I want it:
=====
function drawVisualization() {
// Create and populate the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Task');
data.addColumn('number', 'Hours per Day');
data.addColumn({type:'string', role:'tooltip'});
data.addRows(5);
data.setValue(0, 0, 'Work');
data.setValue(0, 1, 11);
data.setValue(1, 0, 'Eat');
data.setValue(1, 1, 2);
data.setValue(2, 0, 'Commute');
data.setValue(2, 1, 2);
data.setValue(3, 0, 'Watch TV');
data.setValue(3, 1, 2);
data.setValue(4, 0, 'Sleep');
data.setValue(4, 1, 7);
var options = {title:"So, how was your day?", tooltip: {text:
"percentage"}};
// Create and draw the visualization.
new
google.visualization.PieChart(document.getElementById('visualization')).
draw(data, options );
}
=====
How do I make this work with the GWT Visualization interfaces?
Stuart
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment