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