Hi Bevan, you were on the right track. You just need to specify the full string value that you want to show up. I'm not sure what "C" was supposed to mean in your context, but that would just make the letter "C" show up instead of your value. You'd need to specify it as "$12.34". Here's an example of how to do that: http://jsfiddle.net/u1bgkq66/
On Sun Sep 28 2014 at 9:32:40 PM Bevan <i...@wiresplus.co.nz> 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 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. > -- 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.