Need help with % value in annotations

21 views
Skip to first unread message

Vladimir Yakushev

unread,
Mar 6, 2016, 2:39:26 PM3/6/16
to Google Visualization API
Hello lf help with % value in annotations. I made it in hAxis.format by using {format:'#,###%'} but this doesn't work in annotations. See screen attached.

Thanks for help

var options = {
                        fontName:'Century Gothic',
                        fontSize: 14,
                        legend: {position: 'top', textStyle: {color: '#757575', fontSize: 16},maxLines:3},
                        chartArea:{left:'10%',right:'10%',top: 50, bottom:100,width:'90%',height: '100%'},
                   chart: {
                     title: '',
                     subtitle: '',
                   },
                   bars: 'horizontal', // Required for Material Bar Charts.
                        annotations: {
                          format: '#.#%', 
                        },
                   hAxis: {
                          format: '#.#%', 
                          title: 'Доля',
                          textStyle: {
                            fontSize: 14
                          },
                          titleTextStyle: {
                            italic: false,
                            fontSize: 14
                          }
                     

%annotation.jpg

Vladimir Yakushev

unread,
Mar 9, 2016, 7:30:12 AM3/9/16
to Google Visualization API
up 

I'm still fighting with this problem, can't understand how to fix it

воскресенье, 6 марта 2016 г., 22:39:26 UTC+3 пользователь Vladimir Yakushev написал:

Sergey Grabkovsky

unread,
Mar 9, 2016, 9:48:52 AM3/9/16
to Google Visualization API
Hi Vladimir,

In order to change the values in the tooltips, you must run a formatter on your DataTable. Here is an example: http://jsfiddle.net/8bc5g6sq/

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@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/e6e714c2-5ae6-48bf-b3a0-6a1a56f330aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

unnamed.gif

Sergey Grabkovsky

Software Engineer

Google, Inc

gra...@google.com


Reply all
Reply to author
Forward
0 new messages