[visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2019-08-08 Thread Tristan Bailey

Have this problem, and a solution for this in the short term.

POSSIBLE SOLUTION:
use the label which is text string, if you do not need a key and can put 
text needed in a tooltip per slice.

options add:
pieSliceText: 'label',

Then for your label column put '35.77%' the percentage you want. 

On Thursday, 13 December 2012 19:35:02 UTC, asgallant wrote:
>
> You can format the data displayed in the tooltips to 2 decimal places, but 
> not the slice labels.  To format the tooltips, use a NumberFormatter 
> 
>  on 
> the data column in the DataTable.
>
>
>>

-- 
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-visualization-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/cbc0497d-84b7-4a75-920f-781cbeb284c8%40googlegroups.com.


[visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2018-05-14 Thread Miguel González
If I want to do this but, with amcharts, how do I do it?

El miércoles, 21 de mayo de 2014, 7:01:49 (UTC-5), Mahmoud Said escribió:
>
> Did u reach Any solution or workaround?. i'm stuck with the same problem 
> here, I need to display 2 digits after the the decimal point in the 
> percentage. apparently the use of fractionDigits does not help
>
>
>
> function drawChart(data) {
>   var data = google.visualization.arrayToDataTable([
> ['choice', 'sum'],
> ['option1', data.total_val1],
> ['option2', data.total_val2]
>   ]);
>   
>   var options = {
> title: data.title, 
> is3D: true, 
> colors:['#CB5758','#4F8DD6'],
> width:600,
> height:400,
> fontSize: 18,
> chartArea: {width: '80%'}
>   };
>
>   var formatter = new 
> google.visualization.NumberFormat({pattern:'###,###', fractionDigits: 2} );
>   formatter.format(data, 1);
>   
>   var chart = new 
> google.visualization.PieChart(document.getElementById('chart_div'));
>   chart.draw(data, options);  
> }
>
>
>
>
> On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:
>>
>> Is it possible to format the percentage in the pie chart to 2 decimal 
>> places instead of one?
>>
>

-- 
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-visualization-api+unsubscr...@googlegroups.com.
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/5d6fa45f-99bb-4518-a400-ccff88378fb3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2017-10-12 Thread Interspock
Same problem as KADlancer, labeled option for Pie Charts, shows one-decimal 
percentage. 
I prefer to show *no percentage at all* in labeled legend connected with 
the line to the slice.. but I guess that it's not possible...



El jueves, 27 de abril de 2017, 8:59:13 (UTC-3), KADlancer escribió:
>
> I would love an update on this too... I am looking for a way to force the 
> first decimal to show, even for zero values like 8,0%.
>
> I'm using the "labeled" option for my Ring/Pie Charts and I would like to 
> change the formatting of the calculated percentage that is shown below the 
> line of each Pie Chart Slice Label.
>
> Am Dienstag, 19. April 2016 20:31:52 UTC+2 schrieb Shabir Ahmed:
>>
>> do we have any update on this issue, did any find a way to present more 
>> digit with percentage?
>>
>> On Wednesday, May 21, 2014 at 6:41:56 AM UTC-7, Daniel LaLiberte wrote:
>>>
>>> Ah, I should have noticed that you mentioned the percentage value. 
>>>  There is no way at this time to specify the format of the percentage 
>>> value, though I can see it might be useful in some cases.  We'll consider 
>>> it for a feature enhancement.
>>>
>>>
>>> On Wed, May 21, 2014 at 8:44 AM, Mahmoud Said  
>>> wrote:
>>>
 Thank you Daniel, you are right, i tried it. but i realized that both 
 affect the format of the displayed value,   what I need it the "percentage"

 for examples

 the values are   and 

 The percentage should be 77.77  and 33.33  , however, the pie chard 
 displays it as  77.8 and 33.2
 I need to display more fraction digits in the "percentage" part


 On Wed, May 21, 2014 at 2:32 PM, 'Daniel LaLiberte' via Google 
 Visualization API  wrote:

> Mohmoud,
>
> You have conflicting format options.  As the docs about the pattern 
> option say: "When provided, all other options are ignored, except 
> negativeColor."
> So your fractionDigits option is ignored.  But you can get the 
> equivalent of two decimal digits as part of your pattern by using: 
>  pattern: '###,###.00'.
>
> dan
>
>
> On Wed, May 21, 2014 at 8:01 AM, Mahmoud Said  
> wrote:
>
>> Did u reach Any solution or workaround?. i'm stuck with the same 
>> problem here, I need to display 2 digits after the the decimal point in 
>> the 
>> percentage. apparently the use of fractionDigits does not help
>>
>>
>>
>> function drawChart(data) {
>>   var data = google.visualization.arrayToDataTable([
>> ['choice', 'sum'],
>> ['option1', data.total_val1],
>> ['option2', data.total_val2]
>>   ]);
>>   
>>   var options = {
>> title: data.title, 
>> is3D: true, 
>> colors:['#CB5758','#4F8DD6'],
>> width:600,
>> height:400,
>> fontSize: 18,
>> chartArea: {width: '80%'}
>>   };
>>
>>   var formatter = new 
>> google.visualization.NumberFormat({pattern:'###,###', fractionDigits: 2} 
>> );
>>   formatter.format(data, 1);
>>   
>>   var chart = new 
>> google.visualization.PieChart(document.getElementById('chart_div'));
>>   chart.draw(data, options);  
>> }
>>
>>
>>
>>
>> On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:
>>>
>>> Is it possible to format the percentage in the pie chart to 2 
>>> decimal places instead of one?
>>>
>> -- 
>> 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-visualization-api+unsubscr...@googlegroups.com.
>>
>> To post to this group, send email to google-visua...@googlegroups.com
>> .
>> Visit this group at 
>> http://groups.google.com/group/google-visualization-api.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Daniel LaLiberte 
>   - 
> 978-394-1058
> dlali...@google.com   5CC, Cambridge MA
> daniel.l...@gmail.com 9 Juniper Ridge Road, Acton MA
>
> -- 
> You received this message because you are subscribed to a topic in the 
> Google Groups "Google Visualization API" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/google-visualization-api/vCNW1Fdva5o/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to 
> google-visualization-api+unsubscr...@googlegroups.com.
>
> To post to this group, send email to google-visua...@googlegroups.com.
> Visit this group at 
> http://groups.google.com/group/google-visualization-api.

Re: [visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2017-04-27 Thread KADlancer
I would love an update on this too... I am looking for a way to force the 
first decimal to show, even for zero values like 8,0%.

I'm using the "labeled" option for my Ring/Pie Charts and I would like to 
change the formatting of the calculated percentage that is shown below the 
line of each Pie Chart Slice Label.

Am Dienstag, 19. April 2016 20:31:52 UTC+2 schrieb Shabir Ahmed:
>
> do we have any update on this issue, did any find a way to present more 
> digit with percentage?
>
> On Wednesday, May 21, 2014 at 6:41:56 AM UTC-7, Daniel LaLiberte wrote:
>>
>> Ah, I should have noticed that you mentioned the percentage value.  There 
>> is no way at this time to specify the format of the percentage value, 
>> though I can see it might be useful in some cases.  We'll consider it for a 
>> feature enhancement.
>>
>>
>> On Wed, May 21, 2014 at 8:44 AM, Mahmoud Said  
>> wrote:
>>
>>> Thank you Daniel, you are right, i tried it. but i realized that both 
>>> affect the format of the displayed value,   what I need it the "percentage"
>>>
>>> for examples
>>>
>>> the values are   and 
>>>
>>> The percentage should be 77.77  and 33.33  , however, the pie chard 
>>> displays it as  77.8 and 33.2
>>> I need to display more fraction digits in the "percentage" part
>>>
>>>
>>> On Wed, May 21, 2014 at 2:32 PM, 'Daniel LaLiberte' via Google 
>>> Visualization API  wrote:
>>>
 Mohmoud,

 You have conflicting format options.  As the docs about the pattern 
 option say: "When provided, all other options are ignored, except 
 negativeColor."
 So your fractionDigits option is ignored.  But you can get the 
 equivalent of two decimal digits as part of your pattern by using: 
  pattern: '###,###.00'.

 dan


 On Wed, May 21, 2014 at 8:01 AM, Mahmoud Said  
 wrote:

> Did u reach Any solution or workaround?. i'm stuck with the same 
> problem here, I need to display 2 digits after the the decimal point in 
> the 
> percentage. apparently the use of fractionDigits does not help
>
>
>
> function drawChart(data) {
>   var data = google.visualization.arrayToDataTable([
> ['choice', 'sum'],
> ['option1', data.total_val1],
> ['option2', data.total_val2]
>   ]);
>   
>   var options = {
> title: data.title, 
> is3D: true, 
> colors:['#CB5758','#4F8DD6'],
> width:600,
> height:400,
> fontSize: 18,
> chartArea: {width: '80%'}
>   };
>
>   var formatter = new 
> google.visualization.NumberFormat({pattern:'###,###', fractionDigits: 2} 
> );
>   formatter.format(data, 1);
>   
>   var chart = new 
> google.visualization.PieChart(document.getElementById('chart_div'));
>   chart.draw(data, options);  
> }
>
>
>
>
> On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:
>>
>> Is it possible to format the percentage in the pie chart to 2 decimal 
>> places instead of one?
>>
> -- 
> 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-visualization-api+unsubscr...@googlegroups.com.
>
> To post to this group, send email to google-visua...@googlegroups.com.
> Visit this group at 
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/d/optout.
>



 -- 
 Daniel LaLiberte 
   - 978-394-1058
 dlali...@google.com   5CC, Cambridge MA
 daniel.l...@gmail.com 9 Juniper Ridge Road, Acton MA

 -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "Google Visualization API" group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/google-visualization-api/vCNW1Fdva5o/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to 
 google-visualization-api+unsubscr...@googlegroups.com.

 To post to this group, send email to google-visua...@googlegroups.com.
 Visit this group at 
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>> -- 
>>> Mahmoud Said
>>> Software Engineer - eSpace
>>> http://splinter.me/modsaid
>>> blog.modsaid.com
>>>
>>>
>>> -- 
>>> 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 

Re: [visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2017-01-16 Thread Doug Marinaro
Great idea. You can get the same effect by using the ROUND function to two 
places in the field where the percentage is calculated.

On Saturday, May 7, 2016 at 3:30:09 AM UTC-7, slavko...@wonderlab-it.co.uk 
wrote:
>
> Ok, found a way around this - feed the graph with pre-calculated integers 
> that add up to 100 and it will show without decimals!
>
> On Saturday, May 7, 2016 at 11:25:06 AM UTC+1, 
> slavko...@wonderlab-it.co.uk wrote:
>>
>> Hi all,
>>
>> I on the other hand have an opposite requirement -  not to show any 
>> decimals as this clutters the graph. This should be configurable, I can't 
>> see how this can be that big of a deal to implement so it has to wait for 
>> over three years...
>> The more I use chart libraries, the more I think it would be better just 
>> to start drawing SVGs manually...
>>
>> On Tuesday, April 19, 2016 at 7:31:52 PM UTC+1, Shabir Ahmed wrote:
>>>
>>> do we have any update on this issue, did any find a way to present more 
>>> digit with percentage?
>>>
>>> On Wednesday, May 21, 2014 at 6:41:56 AM UTC-7, Daniel LaLiberte wrote:

 Ah, I should have noticed that you mentioned the percentage value. 
  There is no way at this time to specify the format of the percentage 
 value, though I can see it might be useful in some cases.  We'll consider 
 it for a feature enhancement.


 On Wed, May 21, 2014 at 8:44 AM, Mahmoud Said  
 wrote:

> Thank you Daniel, you are right, i tried it. but i realized that both 
> affect the format of the displayed value,   what I need it the 
> "percentage"
>
> for examples
>
> the values are   and 
>
> The percentage should be 77.77  and 33.33  , however, the pie chard 
> displays it as  77.8 and 33.2
> I need to display more fraction digits in the "percentage" part
>
>
> On Wed, May 21, 2014 at 2:32 PM, 'Daniel LaLiberte' via Google 
> Visualization API  wrote:
>
>> Mohmoud,
>>
>> You have conflicting format options.  As the docs about the pattern 
>> option say: "When provided, all other options are ignored, except 
>> negativeColor."
>> So your fractionDigits option is ignored.  But you can get the 
>> equivalent of two decimal digits as part of your pattern by using: 
>>  pattern: '###,###.00'.
>>
>> dan
>>
>>
>> On Wed, May 21, 2014 at 8:01 AM, Mahmoud Said  
>> wrote:
>>
>>> Did u reach Any solution or workaround?. i'm stuck with the same 
>>> problem here, I need to display 2 digits after the the decimal point in 
>>> the 
>>> percentage. apparently the use of fractionDigits does not help
>>>
>>>
>>>
>>> function drawChart(data) {
>>>   var data = google.visualization.arrayToDataTable([
>>> ['choice', 'sum'],
>>> ['option1', data.total_val1],
>>> ['option2', data.total_val2]
>>>   ]);
>>>   
>>>   var options = {
>>> title: data.title, 
>>> is3D: true, 
>>> colors:['#CB5758','#4F8DD6'],
>>> width:600,
>>> height:400,
>>> fontSize: 18,
>>> chartArea: {width: '80%'}
>>>   };
>>>
>>>   var formatter = new 
>>> google.visualization.NumberFormat({pattern:'###,###', fractionDigits: 
>>> 2} );
>>>   formatter.format(data, 1);
>>>   
>>>   var chart = new 
>>> google.visualization.PieChart(document.getElementById('chart_div'));
>>>   chart.draw(data, options);  
>>> }
>>>
>>>
>>>
>>>
>>> On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:

 Is it possible to format the percentage in the pie chart to 2 
 decimal places instead of one?

>>> -- 
>>> 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-visualization-api+unsubscr...@googlegroups.com.
>>>
>>> To post to this group, send email to 
>>> google-visua...@googlegroups.com.
>>> Visit this group at 
>>> http://groups.google.com/group/google-visualization-api.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> Daniel LaLiberte 
>>   - 
>> 978-394-1058
>> dlali...@google.com   5CC, Cambridge MA
>> daniel.l...@gmail.com 9 Juniper Ridge Road, Acton MA
>>
>> -- 
>> You received this message because you are subscribed to a topic in 
>> the Google Groups "Google Visualization API" group.
>> To unsubscribe from this topic, visit 
>> 

Re: [visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2016-05-07 Thread slavko . skular
Ok, found a way around this - feed the graph with pre-calculated integers 
that add up to 100 and it will show without decimals!

On Saturday, May 7, 2016 at 11:25:06 AM UTC+1, slavko...@wonderlab-it.co.uk 
wrote:
>
> Hi all,
>
> I on the other hand have an opposite requirement -  not to show any 
> decimals as this clutters the graph. This should be configurable, I can't 
> see how this can be that big of a deal to implement so it has to wait for 
> over three years...
> The more I use chart libraries, the more I think it would be better just 
> to start drawing SVGs manually...
>
> On Tuesday, April 19, 2016 at 7:31:52 PM UTC+1, Shabir Ahmed wrote:
>>
>> do we have any update on this issue, did any find a way to present more 
>> digit with percentage?
>>
>> On Wednesday, May 21, 2014 at 6:41:56 AM UTC-7, Daniel LaLiberte wrote:
>>>
>>> Ah, I should have noticed that you mentioned the percentage value. 
>>>  There is no way at this time to specify the format of the percentage 
>>> value, though I can see it might be useful in some cases.  We'll consider 
>>> it for a feature enhancement.
>>>
>>>
>>> On Wed, May 21, 2014 at 8:44 AM, Mahmoud Said  
>>> wrote:
>>>
 Thank you Daniel, you are right, i tried it. but i realized that both 
 affect the format of the displayed value,   what I need it the "percentage"

 for examples

 the values are   and 

 The percentage should be 77.77  and 33.33  , however, the pie chard 
 displays it as  77.8 and 33.2
 I need to display more fraction digits in the "percentage" part


 On Wed, May 21, 2014 at 2:32 PM, 'Daniel LaLiberte' via Google 
 Visualization API  wrote:

> Mohmoud,
>
> You have conflicting format options.  As the docs about the pattern 
> option say: "When provided, all other options are ignored, except 
> negativeColor."
> So your fractionDigits option is ignored.  But you can get the 
> equivalent of two decimal digits as part of your pattern by using: 
>  pattern: '###,###.00'.
>
> dan
>
>
> On Wed, May 21, 2014 at 8:01 AM, Mahmoud Said  
> wrote:
>
>> Did u reach Any solution or workaround?. i'm stuck with the same 
>> problem here, I need to display 2 digits after the the decimal point in 
>> the 
>> percentage. apparently the use of fractionDigits does not help
>>
>>
>>
>> function drawChart(data) {
>>   var data = google.visualization.arrayToDataTable([
>> ['choice', 'sum'],
>> ['option1', data.total_val1],
>> ['option2', data.total_val2]
>>   ]);
>>   
>>   var options = {
>> title: data.title, 
>> is3D: true, 
>> colors:['#CB5758','#4F8DD6'],
>> width:600,
>> height:400,
>> fontSize: 18,
>> chartArea: {width: '80%'}
>>   };
>>
>>   var formatter = new 
>> google.visualization.NumberFormat({pattern:'###,###', fractionDigits: 2} 
>> );
>>   formatter.format(data, 1);
>>   
>>   var chart = new 
>> google.visualization.PieChart(document.getElementById('chart_div'));
>>   chart.draw(data, options);  
>> }
>>
>>
>>
>>
>> On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:
>>>
>>> Is it possible to format the percentage in the pie chart to 2 
>>> decimal places instead of one?
>>>
>> -- 
>> 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-visualization-api+unsubscr...@googlegroups.com.
>>
>> To post to this group, send email to google-visua...@googlegroups.com
>> .
>> Visit this group at 
>> http://groups.google.com/group/google-visualization-api.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Daniel LaLiberte 
>   - 
> 978-394-1058
> dlali...@google.com   5CC, Cambridge MA
> daniel.l...@gmail.com 9 Juniper Ridge Road, Acton MA
>
> -- 
> You received this message because you are subscribed to a topic in the 
> Google Groups "Google Visualization API" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/google-visualization-api/vCNW1Fdva5o/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to 
> google-visualization-api+unsubscr...@googlegroups.com.
>
> To post to this group, send email to google-visua...@googlegroups.com.
> Visit this group at 
> http://groups.google.com/group/google-visualization-api.
> For more options, visit 

Re: [visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2016-05-07 Thread slavko . skular
Hi all,

I on the other hand have an opposite requirement -  not to show any 
decimals as this clutters the graph. This should be configurable, I can't 
see how this can be that big of a deal to implement so it has to wait for 
over three years...
The more I use chart libraries, the more I think it would be better just to 
start drawing SVGs manually...

On Tuesday, April 19, 2016 at 7:31:52 PM UTC+1, Shabir Ahmed wrote:
>
> do we have any update on this issue, did any find a way to present more 
> digit with percentage?
>
> On Wednesday, May 21, 2014 at 6:41:56 AM UTC-7, Daniel LaLiberte wrote:
>>
>> Ah, I should have noticed that you mentioned the percentage value.  There 
>> is no way at this time to specify the format of the percentage value, 
>> though I can see it might be useful in some cases.  We'll consider it for a 
>> feature enhancement.
>>
>>
>> On Wed, May 21, 2014 at 8:44 AM, Mahmoud Said  
>> wrote:
>>
>>> Thank you Daniel, you are right, i tried it. but i realized that both 
>>> affect the format of the displayed value,   what I need it the "percentage"
>>>
>>> for examples
>>>
>>> the values are   and 
>>>
>>> The percentage should be 77.77  and 33.33  , however, the pie chard 
>>> displays it as  77.8 and 33.2
>>> I need to display more fraction digits in the "percentage" part
>>>
>>>
>>> On Wed, May 21, 2014 at 2:32 PM, 'Daniel LaLiberte' via Google 
>>> Visualization API  wrote:
>>>
 Mohmoud,

 You have conflicting format options.  As the docs about the pattern 
 option say: "When provided, all other options are ignored, except 
 negativeColor."
 So your fractionDigits option is ignored.  But you can get the 
 equivalent of two decimal digits as part of your pattern by using: 
  pattern: '###,###.00'.

 dan


 On Wed, May 21, 2014 at 8:01 AM, Mahmoud Said  
 wrote:

> Did u reach Any solution or workaround?. i'm stuck with the same 
> problem here, I need to display 2 digits after the the decimal point in 
> the 
> percentage. apparently the use of fractionDigits does not help
>
>
>
> function drawChart(data) {
>   var data = google.visualization.arrayToDataTable([
> ['choice', 'sum'],
> ['option1', data.total_val1],
> ['option2', data.total_val2]
>   ]);
>   
>   var options = {
> title: data.title, 
> is3D: true, 
> colors:['#CB5758','#4F8DD6'],
> width:600,
> height:400,
> fontSize: 18,
> chartArea: {width: '80%'}
>   };
>
>   var formatter = new 
> google.visualization.NumberFormat({pattern:'###,###', fractionDigits: 2} 
> );
>   formatter.format(data, 1);
>   
>   var chart = new 
> google.visualization.PieChart(document.getElementById('chart_div'));
>   chart.draw(data, options);  
> }
>
>
>
>
> On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:
>>
>> Is it possible to format the percentage in the pie chart to 2 decimal 
>> places instead of one?
>>
> -- 
> 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-visualization-api+unsubscr...@googlegroups.com.
>
> To post to this group, send email to google-visua...@googlegroups.com.
> Visit this group at 
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/d/optout.
>



 -- 
 Daniel LaLiberte 
   - 978-394-1058
 dlali...@google.com   5CC, Cambridge MA
 daniel.l...@gmail.com 9 Juniper Ridge Road, Acton MA

 -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "Google Visualization API" group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/google-visualization-api/vCNW1Fdva5o/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to 
 google-visualization-api+unsubscr...@googlegroups.com.

 To post to this group, send email to google-visua...@googlegroups.com.
 Visit this group at 
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>> -- 
>>> Mahmoud Said
>>> Software Engineer - eSpace
>>> http://splinter.me/modsaid
>>> blog.modsaid.com
>>>
>>>
>>> -- 
>>> 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 

Re: [visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2016-04-19 Thread Shabir Ahmed
do we have any update on this issue, did any find a way to present more 
digit with percentage?

On Wednesday, May 21, 2014 at 6:41:56 AM UTC-7, Daniel LaLiberte wrote:
>
> Ah, I should have noticed that you mentioned the percentage value.  There 
> is no way at this time to specify the format of the percentage value, 
> though I can see it might be useful in some cases.  We'll consider it for a 
> feature enhancement.
>
>
> On Wed, May 21, 2014 at 8:44 AM, Mahmoud Said  > wrote:
>
>> Thank you Daniel, you are right, i tried it. but i realized that both 
>> affect the format of the displayed value,   what I need it the "percentage"
>>
>> for examples
>>
>> the values are   and 
>>
>> The percentage should be 77.77  and 33.33  , however, the pie chard 
>> displays it as  77.8 and 33.2
>> I need to display more fraction digits in the "percentage" part
>>
>>
>> On Wed, May 21, 2014 at 2:32 PM, 'Daniel LaLiberte' via Google 
>> Visualization API  wrote:
>>
>>> Mohmoud,
>>>
>>> You have conflicting format options.  As the docs about the pattern 
>>> option say: "When provided, all other options are ignored, except 
>>> negativeColor."
>>> So your fractionDigits option is ignored.  But you can get the 
>>> equivalent of two decimal digits as part of your pattern by using: 
>>>  pattern: '###,###.00'.
>>>
>>> dan
>>>
>>>
>>> On Wed, May 21, 2014 at 8:01 AM, Mahmoud Said >> > wrote:
>>>
 Did u reach Any solution or workaround?. i'm stuck with the same 
 problem here, I need to display 2 digits after the the decimal point in 
 the 
 percentage. apparently the use of fractionDigits does not help



 function drawChart(data) {
   var data = google.visualization.arrayToDataTable([
 ['choice', 'sum'],
 ['option1', data.total_val1],
 ['option2', data.total_val2]
   ]);
   
   var options = {
 title: data.title, 
 is3D: true, 
 colors:['#CB5758','#4F8DD6'],
 width:600,
 height:400,
 fontSize: 18,
 chartArea: {width: '80%'}
   };

   var formatter = new 
 google.visualization.NumberFormat({pattern:'###,###', fractionDigits: 2} );
   formatter.format(data, 1);
   
   var chart = new 
 google.visualization.PieChart(document.getElementById('chart_div'));
   chart.draw(data, options);  
 }




 On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:
>
> Is it possible to format the percentage in the pie chart to 2 decimal 
> places instead of one?
>
 -- 
 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-visualization-api+unsubscr...@googlegroups.com 
 .

 To post to this group, send email to google-visua...@googlegroups.com 
 .
 Visit this group at 
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>> -- 
>>> Daniel LaLiberte 
>>>   - 978-394-1058
>>> dlali...@google.com5CC, Cambridge MA
>>> daniel.l...@gmail.com  9 Juniper Ridge Road, Acton MA
>>>
>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "Google Visualization API" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/google-visualization-api/vCNW1Fdva5o/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to 
>>> google-visualization-api+unsubscr...@googlegroups.com .
>>>
>>> To post to this group, send email to google-visua...@googlegroups.com 
>>> .
>>> Visit this group at 
>>> http://groups.google.com/group/google-visualization-api.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> Mahmoud Said
>> Software Engineer - eSpace
>> http://splinter.me/modsaid
>> blog.modsaid.com
>>
>>
>> -- 
>> 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-visualization-api+unsubscr...@googlegroups.com 
>> .
>> To post to this group, send email to google-visua...@googlegroups.com 
>> .
>> Visit this group at 
>> http://groups.google.com/group/google-visualization-api.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Daniel LaLiberte  
>  - 978-394-1058
> dlali...@google.com5CC, Cambridge MA
> daniel.l...@gmail.com  9 Juniper Ridge Road, Acton MA
>

-- 
You received this message because you are 

[visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2016-04-07 Thread mateusz . nowicki
My workaround for this, was adding event on 'ready' after draw a chart like:
google.visualization.events.addListener(chart, 'ready', function() {

and replace values with formated one (it's not so clean code but i hope 
it's gonna help someone)

Event
google.visualization.events.addListener(chart, 'ready', 
function(e) {
  $('.chart').find('svg g text').each(function(){
var value = $(this).html();
value = value.replace('%', '').replace(',', '.');
value = Number(value).formatNumber(2, ',', ' ');
$(this).html(value+'%');
  });
});

Formater function
Number.prototype.formatNumber = function(c, d, t) {
var n = this,
c = isNaN(c = Math.abs(c)) ? 2 : c,
d = d == undefined ? "." : d,
t = t == undefined ? "," : t,
s = n < 0 ? "-" : "",
i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "",
j = (j = i.length) > 3 ? j % 3 : 0;
return s + (j ? i.substr(0, j) + t : "") + 
i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - 
i).toFixed(c).slice(2) : "");
};




W dniu czwartek, 13 grudnia 2012 20:35:02 UTC+1 użytkownik asgallant 
napisał:
>
> You can format the data displayed in the tooltips to 2 decimal places, but 
> not the slice labels.  To format the tooltips, use a NumberFormatter 
> 
>  on 
> the data column in the DataTable.
>
> On Thursday, December 13, 2012 1:41:12 PM UTC-5, Kwasi wrote:
>>
>> Is it possible to format the percentage in the pie chart to 2 decimal 
>> places instead of one?
>>
>

-- 
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-visualization-api+unsubscr...@googlegroups.com.
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/93de0ff9-e606-44d6-a8f7-afc198d21a9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2016-03-19 Thread Beth
I too am trying to display the fractions on my pie chart without the added 
decimal place. Any progress on this? Thanks.

On Friday, September 4, 2015 at 1:44:16 PM UTC-4, spenc...@pwc.com wrote:
>
> Please make this flexible so any number of decimal points are supported, 
> either specifically or though a format string.  In my case, I wanted to 
> have zero decimal places.
>
> Thanks,
> Spencer
>
> On Thursday, July 30, 2015 at 7:37:31 PM UTC-7, Daniel LaLiberte wrote:
>>
>> We haven't worked on this yet.  (I've been focused on getting the frozen 
>> version 41 out, which it now is, so we'll be moving on to other issues.)
>>
>> Showing more digits of the percentage should help with adding up all of 
>> the slices closer to 100%.  There is no way to get that value out now, 
>> though we'll keep that in mind for the future.
>>
>> Here is how the percentage value is calculated now, using the JavaScript 
>> Math.round function:
>>
>> Math 
>> .round
>>  
>> (relativeValue
>>  
>> 
>>  * 1000) / 10 + '%'
>>
>>
>> On Wed, Jul 29, 2015 at 3:51 PM, Dan C  wrote:
>>
>>> Hi Daniel,
>>>
>>> When will this feature become available? I tried to explain to the 
>>> business that when % values are rounded up/down, there is no way it will 
>>> add up to 100%. Might be +/- 0.1%. However, if we can make it 2 decimal or 
>>> 3 decimal places, then the total should be a lot closer to 100%. Also, is 
>>> there a function that will expose the value of the % inside the legend?
>>>
>>> What rounding method is used for the pie chart?
>>>
>>> Thanks!
>>>
>>> On Wednesday, May 21, 2014 at 9:41:56 AM UTC-4, Daniel LaLiberte wrote:

 Ah, I should have noticed that you mentioned the percentage value.  
 There is no way at this time to specify the format of the percentage 
 value, 
 though I can see it might be useful in some cases.  We'll consider it for 
 a 
 feature enhancement.


 On Wed, May 21, 2014 at 8:44 AM, Mahmoud Said  
 wrote:

> Thank you Daniel, you are right, i tried it. but i realized that both 
> affect the format of the displayed value,   what I need it the 
> "percentage"
>
> for examples
>
> the values are   and 
>
> The percentage should be 77.77  and 33.33  , however, the pie chard 
> displays it as  77.8 and 33.2
> I need to display more fraction digits in the "percentage" part
>
>
> On Wed, May 21, 2014 at 2:32 PM, 'Daniel LaLiberte' via Google 
> Visualization API  wrote:
>
>> Mohmoud,
>>
>> You have conflicting format options.  As the docs about the pattern 
>> option say: "When provided, all other options are ignored, except 
>> negativeColor."
>> So your fractionDigits option is ignored.  But you can get the 
>> equivalent of two decimal digits as part of your pattern by using: 
>>  pattern: '###,###.00'.
>>
>> dan
>>
>>
>> On Wed, May 21, 2014 at 8:01 AM, Mahmoud Said  
>> wrote:
>>
>>> Did u reach Any solution or workaround?. i'm stuck with the same 
>>> problem here, I need to display 2 digits after the the decimal point in 
>>> the 
>>> percentage. apparently the use of fractionDigits does not help
>>>
>>>
>>>
>>> function drawChart(data) {
>>>   var data = google.visualization.arrayToDataTable([
>>> ['choice', 'sum'],
>>> ['option1', data.total_val1],
>>> ['option2', data.total_val2]
>>>   ]);
>>>   
>>>   var options = {
>>> title: data.title, 
>>> is3D: true, 
>>> colors:['#CB5758','#4F8DD6'],
>>> width:600,
>>> height:400,
>>> fontSize: 18,
>>> chartArea: {width: '80%'}
>>>   };
>>>
>>>   var formatter = new 
>>> google.visualization.NumberFormat({pattern:'###,###', fractionDigits: 
>>> 2} );
>>>   formatter.format(data, 1);
>>>   
>>>   var chart = new 
>>> google.visualization.PieChart(document.getElementById('chart_div'));
>>>   chart.draw(data, options);  
>>> }
>>>
>>>
>>>
>>>
>>> On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:

 Is it possible to format the percentage in the pie chart to 2 
 decimal places instead of one?

>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Google Visualization API" group.
>>> To unsubscribe from 

Re: [visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2015-09-04 Thread spencer . yeh
Please make this flexible so any number of decimal points are supported, 
either specifically or though a format string.  In my case, I wanted to 
have zero decimal places.

Thanks,
Spencer

On Thursday, July 30, 2015 at 7:37:31 PM UTC-7, Daniel LaLiberte wrote:
>
> We haven't worked on this yet.  (I've been focused on getting the frozen 
> version 41 out, which it now is, so we'll be moving on to other issues.)
>
> Showing more digits of the percentage should help with adding up all of 
> the slices closer to 100%.  There is no way to get that value out now, 
> though we'll keep that in mind for the future.
>
> Here is how the percentage value is calculated now, using the JavaScript 
> Math.round function:
>
> Math 
> .round
>  
> (relativeValue
>  
> 
>  * 1000) / 10 + '%'
>
>
> On Wed, Jul 29, 2015 at 3:51 PM, Dan C  
> wrote:
>
>> Hi Daniel,
>>
>> When will this feature become available? I tried to explain to the 
>> business that when % values are rounded up/down, there is no way it will 
>> add up to 100%. Might be +/- 0.1%. However, if we can make it 2 decimal or 
>> 3 decimal places, then the total should be a lot closer to 100%. Also, is 
>> there a function that will expose the value of the % inside the legend?
>>
>> What rounding method is used for the pie chart?
>>
>> Thanks!
>>
>> On Wednesday, May 21, 2014 at 9:41:56 AM UTC-4, Daniel LaLiberte wrote:
>>>
>>> Ah, I should have noticed that you mentioned the percentage value.  
>>> There is no way at this time to specify the format of the percentage value, 
>>> though I can see it might be useful in some cases.  We'll consider it for a 
>>> feature enhancement.
>>>
>>>
>>> On Wed, May 21, 2014 at 8:44 AM, Mahmoud Said  
>>> wrote:
>>>
 Thank you Daniel, you are right, i tried it. but i realized that both 
 affect the format of the displayed value,   what I need it the "percentage"

 for examples

 the values are   and 

 The percentage should be 77.77  and 33.33  , however, the pie chard 
 displays it as  77.8 and 33.2
 I need to display more fraction digits in the "percentage" part


 On Wed, May 21, 2014 at 2:32 PM, 'Daniel LaLiberte' via Google 
 Visualization API  wrote:

> Mohmoud,
>
> You have conflicting format options.  As the docs about the pattern 
> option say: "When provided, all other options are ignored, except 
> negativeColor."
> So your fractionDigits option is ignored.  But you can get the 
> equivalent of two decimal digits as part of your pattern by using: 
>  pattern: '###,###.00'.
>
> dan
>
>
> On Wed, May 21, 2014 at 8:01 AM, Mahmoud Said  
> wrote:
>
>> Did u reach Any solution or workaround?. i'm stuck with the same 
>> problem here, I need to display 2 digits after the the decimal point in 
>> the 
>> percentage. apparently the use of fractionDigits does not help
>>
>>
>>
>> function drawChart(data) {
>>   var data = google.visualization.arrayToDataTable([
>> ['choice', 'sum'],
>> ['option1', data.total_val1],
>> ['option2', data.total_val2]
>>   ]);
>>   
>>   var options = {
>> title: data.title, 
>> is3D: true, 
>> colors:['#CB5758','#4F8DD6'],
>> width:600,
>> height:400,
>> fontSize: 18,
>> chartArea: {width: '80%'}
>>   };
>>
>>   var formatter = new 
>> google.visualization.NumberFormat({pattern:'###,###', fractionDigits: 2} 
>> );
>>   formatter.format(data, 1);
>>   
>>   var chart = new 
>> google.visualization.PieChart(document.getElementById('chart_div'));
>>   chart.draw(data, options);  
>> }
>>
>>
>>
>>
>> On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:
>>>
>>> Is it possible to format the percentage in the pie chart to 2 
>>> decimal places instead of one?
>>>
>> -- 
>> 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-visualization-api+unsubscr...@googlegroups.com.
>>
>> To post to this group, send email to google-visua...@googlegroups.com
>> .
>> Visit this group at 
>> http://groups.google.com/group/google-visualization-api.
>> For more options, 

Re: [visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2015-07-30 Thread 'Daniel LaLiberte' via Google Visualization API
We haven't worked on this yet.  (I've been focused on getting the frozen
version 41 out, which it now is, so we'll be moving on to other issues.)

Showing more digits of the percentage should help with adding up all of the
slices closer to 100%.  There is no way to get that value out now, though
we'll keep that in mind for the future.

Here is how the percentage value is calculated now, using the JavaScript
Math.round function:

Math 
https://cs.corp.google.com/#piper///depot/google3/javascript/externs/es3.jsl=896ct=xref_jump_to_defcl=GROKgsn=Math.round
https://cs.corp.google.com/#piper///depot/google3/javascript/externs/es3.jsl=1017ct=xref_jump_to_defcl=GROKgsn=round(relativeValue
https://cs.corp.google.com/#piper///depot/google3/javascript/gviz/devel/canviz/pie-chart-definer.jsl=836ct=xref_jump_to_defcl=GROKgsn=relativeValue
* 1000) / 10 + '%'


On Wed, Jul 29, 2015 at 3:51 PM, Dan C dan.cuper...@gmail.com wrote:

 Hi Daniel,

 When will this feature become available? I tried to explain to the
 business that when % values are rounded up/down, there is no way it will
 add up to 100%. Might be +/- 0.1%. However, if we can make it 2 decimal or
 3 decimal places, then the total should be a lot closer to 100%. Also, is
 there a function that will expose the value of the % inside the legend?

 What rounding method is used for the pie chart?

 Thanks!

 On Wednesday, May 21, 2014 at 9:41:56 AM UTC-4, Daniel LaLiberte wrote:

 Ah, I should have noticed that you mentioned the percentage value.  There
 is no way at this time to specify the format of the percentage value,
 though I can see it might be useful in some cases.  We'll consider it for a
 feature enhancement.


 On Wed, May 21, 2014 at 8:44 AM, Mahmoud Said eng.mahm...@gmail.com
 wrote:

 Thank you Daniel, you are right, i tried it. but i realized that both
 affect the format of the displayed value,   what I need it the percentage

 for examples

 the values are   and 

 The percentage should be 77.77  and 33.33  , however, the pie chard
 displays it as  77.8 and 33.2
 I need to display more fraction digits in the percentage part


 On Wed, May 21, 2014 at 2:32 PM, 'Daniel LaLiberte' via Google
 Visualization API google-visua...@googlegroups.com wrote:

 Mohmoud,

 You have conflicting format options.  As the docs about the pattern
 option say: When provided, all other options are ignored, except
 negativeColor.
 So your fractionDigits option is ignored.  But you can get the
 equivalent of two decimal digits as part of your pattern by using:
  pattern: '###,###.00'.

 dan


 On Wed, May 21, 2014 at 8:01 AM, Mahmoud Said eng.mahm...@gmail.com
 wrote:

 Did u reach Any solution or workaround?. i'm stuck with the same
 problem here, I need to display 2 digits after the the decimal point in 
 the
 percentage. apparently the use of fractionDigits does not help



 function drawChart(data) {
   var data = google.visualization.arrayToDataTable([
 ['choice', 'sum'],
 ['option1', data.total_val1],
 ['option2', data.total_val2]
   ]);

   var options = {
 title: data.title,
 is3D: true,
 colors:['#CB5758','#4F8DD6'],
 width:600,
 height:400,
 fontSize: 18,
 chartArea: {width: '80%'}
   };

   var formatter = new
 google.visualization.NumberFormat({pattern:'###,###', fractionDigits: 2} 
 );
   formatter.format(data, 1);

   var chart = new
 google.visualization.PieChart(document.getElementById('chart_div'));
   chart.draw(data, options);
 }




 On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:

 Is it possible to format the percentage in the pie chart to 2 decimal
 places instead of one?

 --
 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-visualization-api+unsubscr...@googlegroups.com.

 To post to this group, send email to google-visua...@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.




 --
 Daniel LaLiberte
 https://plus.google.com/100631381223468223275?prsrc=2  - 978-394-1058
 dlali...@google.com   5CC, Cambridge MA
 daniel.l...@gmail.com 9 Juniper Ridge Road, Acton MA

 --
 You received this message because you are subscribed to a topic in the
 Google Groups Google Visualization API group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/google-visualization-api/vCNW1Fdva5o/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 google-visualization-api+unsubscr...@googlegroups.com.

 To post to this group, send email to google-visua...@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.




 --
 Mahmoud Said
 Software Engineer - eSpace

Re: [visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2015-07-29 Thread Dan C
Hi Daniel,

When will this feature become available? I tried to explain to the business 
that when % values are rounded up/down, there is no way it will add up to 
100%. Might be +/- 0.1%. However, if we can make it 2 decimal or 3 decimal 
places, then the total should be a lot closer to 100%. Also, is there a 
function that will expose the value of the % inside the legend?

What rounding method is used for the pie chart?

Thanks!

On Wednesday, May 21, 2014 at 9:41:56 AM UTC-4, Daniel LaLiberte wrote:

 Ah, I should have noticed that you mentioned the percentage value.  There 
 is no way at this time to specify the format of the percentage value, 
 though I can see it might be useful in some cases.  We'll consider it for a 
 feature enhancement.


 On Wed, May 21, 2014 at 8:44 AM, Mahmoud Said eng.mahm...@gmail.com 
 javascript: wrote:

 Thank you Daniel, you are right, i tried it. but i realized that both 
 affect the format of the displayed value,   what I need it the percentage

 for examples

 the values are   and 

 The percentage should be 77.77  and 33.33  , however, the pie chard 
 displays it as  77.8 and 33.2
 I need to display more fraction digits in the percentage part


 On Wed, May 21, 2014 at 2:32 PM, 'Daniel LaLiberte' via Google 
 Visualization API google-visua...@googlegroups.com javascript: wrote:

 Mohmoud,

 You have conflicting format options.  As the docs about the pattern 
 option say: When provided, all other options are ignored, except 
 negativeColor.
 So your fractionDigits option is ignored.  But you can get the 
 equivalent of two decimal digits as part of your pattern by using: 
  pattern: '###,###.00'.

 dan


 On Wed, May 21, 2014 at 8:01 AM, Mahmoud Said eng.mahm...@gmail.com 
 javascript: wrote:

 Did u reach Any solution or workaround?. i'm stuck with the same 
 problem here, I need to display 2 digits after the the decimal point in 
 the 
 percentage. apparently the use of fractionDigits does not help



 function drawChart(data) {
   var data = google.visualization.arrayToDataTable([
 ['choice', 'sum'],
 ['option1', data.total_val1],
 ['option2', data.total_val2]
   ]);
   
   var options = {
 title: data.title, 
 is3D: true, 
 colors:['#CB5758','#4F8DD6'],
 width:600,
 height:400,
 fontSize: 18,
 chartArea: {width: '80%'}
   };

   var formatter = new 
 google.visualization.NumberFormat({pattern:'###,###', fractionDigits: 2} );
   formatter.format(data, 1);
   
   var chart = new 
 google.visualization.PieChart(document.getElementById('chart_div'));
   chart.draw(data, options);  
 }




 On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:

 Is it possible to format the percentage in the pie chart to 2 decimal 
 places instead of one?

  -- 
 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-visualization-api+unsubscr...@googlegroups.com 
 javascript:.
  
 To post to this group, send email to google-visua...@googlegroups.com 
 javascript:.
 Visit this group at 
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.




 -- 
 Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2
   - 978-394-1058
 dlali...@google.com javascript:   5CC, Cambridge MA
 daniel.l...@gmail.com javascript: 9 Juniper Ridge Road, Acton MA
  
 -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups Google Visualization API group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/google-visualization-api/vCNW1Fdva5o/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to 
 google-visualization-api+unsubscr...@googlegroups.com javascript:.

 To post to this group, send email to google-visua...@googlegroups.com 
 javascript:.
 Visit this group at 
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.




 -- 
 Mahmoud Said
 Software Engineer - eSpace
 http://splinter.me/modsaid
 blog.modsaid.com


  -- 
 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-visualization-api+unsubscr...@googlegroups.com 
 javascript:.
 To post to this group, send email to google-visua...@googlegroups.com 
 javascript:.
 Visit this group at 
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.




 -- 
 Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2 
  - 978-394-1058
 dlali...@google.com javascript:   5CC, Cambridge MA
 daniel.l...@gmail.com javascript: 9 Juniper Ridge Road, Acton MA
  

-- 
You 

[visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2014-05-21 Thread Mahmoud Said
Did u reach Any solution or workaround?. i'm stuck with the same problem 
here, I need to display 2 digits after the the decimal point in the 
percentage. apparently the use of fractionDigits does not help



function drawChart(data) {
  var data = google.visualization.arrayToDataTable([
['choice', 'sum'],
['option1', data.total_val1],
['option2', data.total_val2]
  ]);
  
  var options = {
title: data.title, 
is3D: true, 
colors:['#CB5758','#4F8DD6'],
width:600,
height:400,
fontSize: 18,
chartArea: {width: '80%'}
  };

  var formatter = new google.visualization.NumberFormat({pattern:'###,###', 
fractionDigits: 2} );
  formatter.format(data, 1);
  
  var chart = new 
google.visualization.PieChart(document.getElementById('chart_div'));
  chart.draw(data, options);  
}




On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:

 Is it possible to format the percentage in the pie chart to 2 decimal 
 places instead of one?


-- 
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-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2014-05-21 Thread Mahmoud Said
Thank you Daniel, you are right, i tried it. but i realized that both
affect the format of the displayed value,   what I need it the percentage

for examples

the values are   and 

The percentage should be 77.77  and 33.33  , however, the pie chard
displays it as  77.8 and 33.2
I need to display more fraction digits in the percentage part


On Wed, May 21, 2014 at 2:32 PM, 'Daniel LaLiberte' via Google
Visualization API google-visualization-api@googlegroups.com wrote:

 Mohmoud,

 You have conflicting format options.  As the docs about the pattern option
 say: When provided, all other options are ignored, except negativeColor.
 So your fractionDigits option is ignored.  But you can get the equivalent
 of two decimal digits as part of your pattern by using:  pattern:
 '###,###.00'.

 dan


 On Wed, May 21, 2014 at 8:01 AM, Mahmoud Said 
 eng.mahmoud.s...@gmail.comwrote:

 Did u reach Any solution or workaround?. i'm stuck with the same problem
 here, I need to display 2 digits after the the decimal point in the
 percentage. apparently the use of fractionDigits does not help



 function drawChart(data) {
   var data = google.visualization.arrayToDataTable([
 ['choice', 'sum'],
 ['option1', data.total_val1],
 ['option2', data.total_val2]
   ]);

   var options = {
 title: data.title,
 is3D: true,
 colors:['#CB5758','#4F8DD6'],
 width:600,
 height:400,
 fontSize: 18,
 chartArea: {width: '80%'}
   };

   var formatter = new
 google.visualization.NumberFormat({pattern:'###,###', fractionDigits: 2} );
   formatter.format(data, 1);

   var chart = new
 google.visualization.PieChart(document.getElementById('chart_div'));
   chart.draw(data, options);
 }




 On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:

 Is it possible to format the percentage in the pie chart to 2 decimal
 places instead of one?

  --
 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-visualization-api+unsubscr...@googlegroups.com.

 To post to this group, send email to
 google-visualization-api@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.




 --
 Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2
  - 978-394-1058
 dlalibe...@google.com dlalibe...@google.com   5CC, Cambridge MA
 daniel.lalibe...@gmail.com daniel.lalibe...@gmail.com 9 Juniper Ridge
 Road, Acton MA

 --
 You received this message because you are subscribed to a topic in the
 Google Groups Google Visualization API group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/google-visualization-api/vCNW1Fdva5o/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 google-visualization-api+unsubscr...@googlegroups.com.
 To post to this group, send email to
 google-visualization-api@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.




-- 
Mahmoud Said
Software Engineer - eSpace
http://splinter.me/modsaid
blog.modsaid.com

-- 
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-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2014-05-21 Thread 'Daniel LaLiberte' via Google Visualization API
Ah, I should have noticed that you mentioned the percentage value.  There
is no way at this time to specify the format of the percentage value,
though I can see it might be useful in some cases.  We'll consider it for a
feature enhancement.


On Wed, May 21, 2014 at 8:44 AM, Mahmoud Said eng.mahmoud.s...@gmail.comwrote:

 Thank you Daniel, you are right, i tried it. but i realized that both
 affect the format of the displayed value,   what I need it the percentage

 for examples

 the values are   and 

 The percentage should be 77.77  and 33.33  , however, the pie chard
 displays it as  77.8 and 33.2
 I need to display more fraction digits in the percentage part


 On Wed, May 21, 2014 at 2:32 PM, 'Daniel LaLiberte' via Google
 Visualization API google-visualization-api@googlegroups.com wrote:

 Mohmoud,

 You have conflicting format options.  As the docs about the pattern
 option say: When provided, all other options are ignored, except
 negativeColor.
 So your fractionDigits option is ignored.  But you can get the equivalent
 of two decimal digits as part of your pattern by using:  pattern:
 '###,###.00'.

 dan


 On Wed, May 21, 2014 at 8:01 AM, Mahmoud Said eng.mahmoud.s...@gmail.com
  wrote:

 Did u reach Any solution or workaround?. i'm stuck with the same problem
 here, I need to display 2 digits after the the decimal point in the
 percentage. apparently the use of fractionDigits does not help



 function drawChart(data) {
   var data = google.visualization.arrayToDataTable([
 ['choice', 'sum'],
 ['option1', data.total_val1],
 ['option2', data.total_val2]
   ]);

   var options = {
 title: data.title,
 is3D: true,
 colors:['#CB5758','#4F8DD6'],
 width:600,
 height:400,
 fontSize: 18,
 chartArea: {width: '80%'}
   };

   var formatter = new
 google.visualization.NumberFormat({pattern:'###,###', fractionDigits: 2} );
   formatter.format(data, 1);

   var chart = new
 google.visualization.PieChart(document.getElementById('chart_div'));
   chart.draw(data, options);
 }




 On Thursday, December 13, 2012 8:41:12 PM UTC+2, Kwasi wrote:

 Is it possible to format the percentage in the pie chart to 2 decimal
 places instead of one?

  --
 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-visualization-api+unsubscr...@googlegroups.com.

 To post to this group, send email to
 google-visualization-api@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.




 --
 Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2
  - 978-394-1058
 dlalibe...@google.com dlalibe...@google.com   5CC, Cambridge MA
 daniel.lalibe...@gmail.com daniel.lalibe...@gmail.com 9 Juniper Ridge
 Road, Acton MA

 --
 You received this message because you are subscribed to a topic in the
 Google Groups Google Visualization API group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/google-visualization-api/vCNW1Fdva5o/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 google-visualization-api+unsubscr...@googlegroups.com.

 To post to this group, send email to
 google-visualization-api@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.




 --
 Mahmoud Said
 Software Engineer - eSpace
 http://splinter.me/modsaid
 blog.modsaid.com


  --
 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-visualization-api+unsubscr...@googlegroups.com.
 To post to this group, send email to
 google-visualization-api@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.




-- 
Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2  -
978-394-1058
dlalibe...@google.com dlalibe...@google.com   5CC, Cambridge MA
daniel.lalibe...@gmail.com daniel.lalibe...@gmail.com 9 Juniper Ridge
Road, Acton 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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2012-12-14 Thread Kwasi
Thanks asgallant ,
But I'm calling the labels and values from a database straight into the 
data.colum without generating a table. IS it possible to format the values 
in my case?


On Thursday, December 13, 2012 7:35:02 PM UTC, asgallant wrote:

 You can format the data displayed in the tooltips to 2 decimal places, but 
 not the slice labels.  To format the tooltips, use a 
 NumberFormatterhttps://developers.google.com/chart/interactive/docs/reference#numberformatter
  on 
 the data column in the DataTable.

 On Thursday, December 13, 2012 1:41:12 PM UTC-5, Kwasi wrote:

 Is it possible to format the percentage in the pie chart to 2 decimal 
 places instead of one?



-- 
You received this message because you are subscribed to the Google Groups 
Google Visualization API group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/KXJbjppvPZQJ.
To post to this group, send email to google-visualization-api@googlegroups.com.
To unsubscribe from this group, send email to 
google-visualization-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.



[visualization-api] Re: Is it possible to format the percentage in the pie chart to 2 decimal places instead of one?

2012-12-14 Thread asgallant
I'll have to take a look at your code so I can see what it is you're doing 
before I can give a yes or no.

On Friday, December 14, 2012 12:03:35 PM UTC-5, Kwasi wrote:

 Thanks asgallant ,
 But I'm calling the labels and values from a database straight into the 
 data.colum without generating a table. IS it possible to format the values 
 in my case?


 On Thursday, December 13, 2012 7:35:02 PM UTC, asgallant wrote:

 You can format the data displayed in the tooltips to 2 decimal places, 
 but not the slice labels.  To format the tooltips, use a 
 NumberFormatterhttps://developers.google.com/chart/interactive/docs/reference#numberformatter
  on 
 the data column in the DataTable.

 On Thursday, December 13, 2012 1:41:12 PM UTC-5, Kwasi wrote:

 Is it possible to format the percentage in the pie chart to 2 decimal 
 places instead of one?



-- 
You received this message because you are subscribed to the Google Groups 
Google Visualization API group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/Bo68EabYnIQJ.
To post to this group, send email to google-visualization-api@googlegroups.com.
To unsubscribe from this group, send email to 
google-visualization-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.