Thank you Sir! That helps me a lot! On Monday, April 15, 2013 2:46:02 PM UTC-4, asgallant wrote: > > You have a few things to fix: > > 1) you need to call the formatter's #format method, passing in the > DataTable and the column to format > 2) your vAxis option is structured incorrectly > 3) the percent formatter assumes that the data is in decimal format to > begin with, so 10% should be the number 0.1, not 10. To format your data > as-is, you want to append a percent sign rather than transform the data > into a percent > > see the fixed code here: http://jsfiddle.net/asgallant/ZgS95/ > > On Monday, April 15, 2013 1:57:24 PM UTC-4, Chris Stamoulis wrote: >> >> Hi there, >> >> I would like the tooltips to display "#%" as well as the numbers on the >> vAxis. Currently they both display the integer. I am not sure where I am >> going wrong. >> >> function drawVisualization() {var formatter = new >> google.visualization.NumberFormat({pattern: '#%', fractionDigits: 2 });var >> formatter = new google.visualization.NumberFormat({ pattern: '#%', >> fractionDigits: 2}); var data = >> google.visualization.arrayToDataTable([['Business Team', 'Team'],['Apr >> 2012', 49],['May 2012', 72],['Jun 2012', 91],['Jul 2012', 84],['Aug 2012', >> 81],['Sep 2012', 86],['Oct 2012', 70],['Nov 2012', 91],['Dec 2012', >> 95],['Jan 2013', 92],['Feb 2013', 92],['Mar 2013', 92],['Apr 2013', >> 100]]);new >> google.visualization.LineChart(document.getElementById('sla_trending_0')).draw(data, >> >> {curveType: "function",width: 900, height: 400,vAxis: {gridlines: >> {count: 10, vAxis: {format:'#%'}},viewWindowMode: 'explict',viewWindow:{ >> max:110, min:0}}}); } google.setOnLoadCallback(drawVisualization); >> >
-- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
