google-code-export / google-ajax-examples

Automatically exported from code.google.com/p/google-ajax-examples
1 stars 1 forks source link

Google Chart API, PieChart's tooltipText : 'percentage' does not work #84

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1)Put this in the Visualization Playground and run 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.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 = {};
  options['tooltipText'] = 'percentage';
  options['title'] = 'some title';
  // Create and draw the visualization.
  new google.visualization.PieChart(document.getElementById('visualization')).
    draw(data,options);
}

What is the expected output? What do you see instead?

When I hover over a pie slice, I am supposed to see only its percentage value, 
but I also see its numerical value. This behavior doesn't change, and does not 
cause any warnings or errors even if I set this option to a random string:

options['tooltipText'] = 'asdfasdfsadf';

What version of the product are you using? On what operating system?
I am using the version used in the Visualization Playground, on Ubuntu 
10.04/Firefox 5.0 and also Chromium 12.0.742.112

Please provide any additional information below.

Original issue reported on code.google.com by *nik...@localresponse.com on 14 Jul 2011 at 7:07

GoogleCodeExporter commented 9 years ago
Same here on Mac OS X, Safari 5... tooltipText does not work or change anything.

Original comment by xavier.b...@free.fr on 7 Aug 2011 at 1:54