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.