Try  "£#,##0.00" instead.  The '0' means always show a digit for that
position,

On Tue, Apr 25, 2017 at 4:31 AM, Chethan K <[email protected]> wrote:

> Hi,
> I have a line graph with multiple line in it, and I need to change the
> currency of the vAxis data. Below is the code that I tried, but I am not
> able to see "£0.00" instead its displaying "£.00".
> Can you please let me know how to achieve this.
>
> Code:
> var data = new google.visualization.DataTable();
> data.addColumn('string', 'Month');
> data.addColumn('number', '2016');
> data.addColumn({type: 'string', role: 'tooltip', 'p': {'html': true}});
> data.addColumn('number', '2017');
> data.addColumn({type: 'string', role: 'tooltip', 'p': {'html': true}});
>
> data.addRow(['Jan', 10, 'Total Amount: £10.00', 113, 'Total Amount:
> £113.00']);
> data.addRow(['Feb', 20, 'Total Amount: £20.00', 19, 'Total Amount:
> £19.00']);
> data.addRow(['Mar', 130, 'Total Amount: £130.00', 189, 'Total Amount:
> £189.00']);
> data.addRow(['Apr', 140, 'Total Amount: £140.00', 11, 'Total Amount:
> £11.00']);
>
> var options = {
>     curveType: 'none',
>     legend: { position: 'bottom' },
>     vAxis: {format: "£#,###.00",textStyle: {bold: 1,fontName:
> 'open-sans'}, viewWindow:{min: 0}, maxValue: 1000},
>     hAxis: {textStyle: {bold: 1,fontName: 'open-sans',fontSize:7}},
>     width: '100%',
>     pointSize : 6,
>     lineWidth: 4,
>     colors: ['#fca257','#014761']
> };
>
> var chart = new google.visualization.LineChart(document.
> getElementById('curve_chart'));
> chart.draw(data, options);
>
>
> Thanks
>
> --
> 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/254011ac-fd17-4e7d-bd76-
> 702737aa2475%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/254011ac-fd17-4e7d-bd76-702737aa2475%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/CAOtcSJOk7M5nWjKzoEULhnVsohd4b5KBh%2BXoXPebbopexFywhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to