I'm not sure what you mean by "the actual value of the pointer". You will have to specify a different string for every datum. Or you could use the NumberFormat to do this automatically for every datum: https://developers.google.com/chart/interactive/docs/reference?hl=ja#numberformatter
On Tue Sep 30 2014 at 7:07:45 PM Bevan <[email protected]> wrote: > Ok, but this just gives me exactly that - the figure $12.34 instead of the > actual value of the pointer. > > > On Monday, September 29, 2014 2:32:37 PM UTC+13, Bevan wrote: >> >> Hello, >> >> I have the following: >> >>> <script type="text/javascript"> >> >> google.load("visualization", "1", {packages:["gauge"]}); >> google.setOnLoadCallback(drawChart); >> function drawChart() { >> var sales = @todaySales; >> var dayTarget = @dailyTarget; >> var apdTarget = 22500; >> var data = google.visualization.arrayToDataTable([ >> ['Label', 'Value'], >> ['Today', sales], >> ]); >> var options = { >> width: 400, height: 400, >> redFrom: 0, redTo: apdTarget, >> greenFrom: apdTarget, greenTo: dayTarget, >> minorTicks: 5, max: dayTarget >> }; >> var chart = new google.visualization.Gauge( >> document.getElementById('daily_Sales')); >> chart.draw(data, options); >> }; >> >> Now, I want to format the value to a currency, $12.34. >> >> The variable 'sales' is a numerical value to 10 decimal places extracted >> from an SQL database with aspx prior to this gauge code, declared as >> @todaySales >> >> I want to format the label and tried this: >> ['Label', 'Value'], >> ['Today', {v: sales, f: 'C']] >> uh, No. >> >> What can I do? >> > -- > 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 > http://groups.google.com/group/google-visualization-api. > For more options, visit https://groups.google.com/d/optout. > -- 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 http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
