i get data for average time in seconds from google analytics, and i want display that data in piechart in minutes:seconds. Thank you for your answers
1 Answers
From pie chart Configuration Options there is no supported way for that.
Pie slice text/value is configured using option pieSliceText
option and you can have none, percentage, value or name
values.
For tooltip
is similar: you can have both, value or percentage
.
You can set your own legend with converted data from values to min:sec
. How to do that is described in How to add Percentage and Total on the Legend of Google Pie Charts.
There is one completely unsupported possibility: to filter out DOM elements which contain values of your data using:
document.querySelectorAll('text[text-anchor=start]');
and than change value of element with converted value. But using that you will get at least one element which contains text and not data which should be converted. And this solution could break when google change DOM element attributes.

- 1
- 1

- 11,188
- 2
- 29
- 42
-
thank you, I know it will posible to add minutes on my own legend, but is it posible to display that values to pie chart instead of percentage. It is posible to do that by filtering my DOM elements and replacing displayed text with my own data in minutes:second, now i display on my pie chart just seconds i get querying google analytics – user3319066 Feb 19 '14 at 10:16
-
As I know, answer is no. `pieSliceText` has not option for transformed value. – Anto Jurković Feb 19 '14 at 10:37