The allValuesSuffix options is ambiguous about what happens with the '%' character. It has a special meaning when used in a number format, which is to calculate the percentage for the value, as well as adding the percent character. I'm not sure whether we should change the behavior now (perhaps this can be considered a bug), but you can work around this side effect of appending the '%' by preceding it with the formatting quote character, which is a single quote. So in JavaScript, if you use double quotes around your suffix, it would be: allValuesSuffix: "'%" but if you use single quotes around the suffix, you have to escape single quote, like this: allValuesSuffix: '\'%'.
On Wed, Aug 2, 2017 at 12:16 PM, 'Craig' via Google Visualization API < [email protected]> wrote: > Following is the HTML file generated by the Perl program including the > data rows and annotations. The file is executed in the div/iframe > following the file output in the Perl code. I include this code after the > generated file. I hope this is what you were asking for. > > <html> > > <head> > > <script type='text/javascript' src=' > https://www.gstatic.com/charts/loader.js'></script> > > > > <script type='text/javascript'> > > google.charts.load('current', {'packages':[' > annotatedtimeline']}); > > google.charts.setOnLoadCallback(drawChart); > > > > function drawChart() { > > var data = new google.visualization.DataTable(); > > > data.addColumn('date', 'Date'); > > data.addColumn('number', 'State'); > > data.addColumn('string', 'title1'); > > data.addColumn('string', 'text1'); > data.addRows([ [new > Date(2001,6,1), 64.5, undefined, undefined], [new > Date(2003,0,15), 77.3,'Insurance For All','The Universal Coverage Act of > 2003 is proposed.'], [new Date(2003,2,15), > 77.3,'Insurance Finally','The Universal Coverage Act of 2003 > passes.'], [new Date(2003,6,1), 77.3,'Funding > Approved','The Universal Coverage Act funding is > allocated.'], [new Date(2003,8,15), 77.3,'Funding > Begins','The Universal Coverage Act funding of 2003 > begins.'], [new Date(2005,6,1), 78.6, undefined, > undefined], [new Date(2007,6,1), 78.6, undefined, > undefined], [new Date(2009,6,1), 78.6, undefined, > undefined], [new Date(2011,6,1), 78.6, undefined, > undefined] ]); > > > > var chart = new google.visualization. > AnnotatedTimeLine(document.getElementById('chart_div')); > > > chart.draw(data, {displayAnnotations: true, > displayZoomButtons: false, allValuesSuffix: '%', fill: 40, thickness: 1, > colors:['#809FFF'], displayRangeSelector: false}); > > } > > </script> > > </head> > > <body> > > > > <div id='chart_div' style='width: 800px; height: > 380px;'></div> > > > > </body> > </html> > > > > print " > <form name='tabcontrol' style='margin-top:0'> > <DIV ID='container$i' $deStyl><iframe id='tabiframe' src='$in' > width='840px' height='430px' BORDER=0 FRAMEBORDER=0 > FRAMESPACING=0></iframe></DIV> > </form>\n"; > >> >> -- > 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 google-visualization-api@ > googlegroups.com. > Visit this group at https://groups.google.com/ > group/google-visualization-api. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/google-visualization-api/1f4c6d0d-31f8-4fea-b5ea- > 6081fe41c0e0%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/1f4c6d0d-31f8-4fea-b5ea-6081fe41c0e0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 5CC, Cambridge MA -- 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 https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJMpXZxJkrzBOB36sV91GxMC21MxJuDJFrAaMWeFw94e%2BA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
