Hi
I have a Visual Studio C# app and I'm showing a Gauge on my site.  But I 
just would like to change the value in the gauge programmatically and I'm 
not sure how.
In the sample below I pass the static value of 0 for YTD, but I would like 
to do this as a parameter or with the C# code behind.

I have a script section in the header...

 <script type='text/javascript' src='https://www.google.com/jsapi'></script>
    <script type='text/javascript'>
        google.load('visualization', '1', { packages: ['gauge'] });
        google.setOnLoadCallback(drawChart);
        function drawChart() {
            var BudgetData = google.visualization.arrayToDataTable
            ([
                ['Label', 'Value'],
                ['YTD', 0];

            var options = {
                width: 350, height: 150,
                greenFrom: -40, greenTo: 10,
                minorTicks: 5, majorticks: 2
            };
            //Budget
            var chart = new 
google.visualization.Gauge(document.getElementById('BudgetGauge'));
            chart.draw(BudgetData, options);
        }
    </script>

And then I show the gauge like:
<div id="BudgetGauge" style="height: 100px;"></div>

How can I make the value of 0 dynamic?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/VN1_ulUGgMsJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to