Thanks for this!

where you have var flipNumber = data.getValue(0,0); - is that my column and 
row that I am after info from? In which case, I could drop the "&range=A1" 
from the query url?

where you say "do something with flipNumber" do you mean that the above 
function goes and gets the value, and now I can do something with it? 

I'm sorry that the questions are very beginner. Do I need to create a div 
to do something with the flipNumber? Do I do something inside the body? Can 
you give me a simple piece of code that would display whatever was in that 
cell?

Billy

On Tuesday, October 16, 2012 10:58:02 AM UTC-7, asgallant wrote:
>
> Ahh, ok.  So basically, the implementation of the ChartWrappers using 
> query's is a bit quirky, so there isn't actually any way to get the 
> DataTable back out when doing that (at least, not when I last checked, 
> which was admittedly a long time ago).  What you should do here is switch 
> to using a regular query, something like this:
>
> google.load('visualization', '1', {'packages': ['corechart']});
> google.setOnLoadCallback(drawVisualization);
>
> function drawVisualization() {
>     var query = new google.visualization.Query('
> https://docs.google.com/spreadsheet/ccc?key=0ArzcNGBduYipdDc3VUtSQUQ4dUNRdnVRZUYzTGRjZVE&range=A1
> ');
>     query.send(function (response) {
>         if (response.isError()) {
>             alert('Error in query: ' + response.getMessage() + ' ' + 
> response.getDetailedMessage());
>             return;
>         }
>         
>         var data = response.getDataTable();
>         var flipNumber = data.getValue(0, 0);
>         // do something with flipNumber
>     });
> }
>
> I'm not certain what will happen when you query a cell with an image in 
> it; that's not something I've ever seen done before.  You should be fine if 
> it returns an <img> tag with the appropriate url, though.
>
> On Tuesday, October 16, 2012 1:05:57 PM UTC-4, Billy Bones wrote:
>>
>> Thanks ASG!
>>
>> I'm in over my head. I am using chart wrappers to draw the charts. I am 
>> giving them a containerId at this time. Then I am creating a div that it 
>> sits inside of. Do I scrap that to call the DataTable#getValue method or is 
>> that something I do inside of the chart wrapper? When I set up the chart 
>> wrapper to call the data table, it will import numbers into my dashboard, 
>> but I have a  flip number as a jpg associated with each real number, and I 
>> was trying to bring those over from the spreadsheet. I imagine that there 
>> is a much better way to do what I am trying to do. 
>>
>> <!DOCTYPE html>
>> <html>
>>     <head>
>>         <meta http-equiv="Content-Type" content="text/html; 
>> charset=UTF-8"></meta>
>>         <title>Home Page</title>
>>         <!--Load the AJAX API-->
>>         <script type="text/javascript" src="http://www.google.com/jsapi
>> "></script>
>>         <script type="text/javascript">
>>             //Load the Visualization API and the ready-made Google table 
>> visualization
>>             google.load('visualization', '1', {'packages':['corechart']});
>>         </script>
>>
>>         <script type='text/javascript'>
>>   function drawF() {
>>                 // Define the chart using setters:
>>                 var wrap = new google.visualization.ChartWrapper();
>>                 wrap.setChartType('Table');
>>                 wrap.setDataSourceUrl('
>> https://docs.google.com/spreadsheet/ccc?key=0ArzcNGBduYipdDc3VUtSQUQ4dUNRdnVRZUYzTGRjZVE&range=A1'
>> );
>>                 wrap.setContainerId('flipnumbers');
>>                 wrap.setOptions({'title':'Total 
>> Clients','width':480,'height':410,});
>>                 wrap.draw();
>>                 wrap.getChart();
>>             }
>>  function drawVisualization() {
>>                drawF ();  
>>             }
>>
>>             google.setOnLoadCallback(drawVisualization);
>>         </script>
>>     </head>
>>     <body>
>>  <div id="flipnumbers" 
>>  style="position:absolute;left:10px;top:0px;border:5px black 
>> solid;border-radius:25px; 
>> -moz-border-radius:25px;height:420px;width:500px;padding:6px;"></div>
>>
>>        </div>
>>        </div>  
>>
>>      </body>
>> </html>
>>
>> On Monday, October 15, 2012 3:17:33 PM UTC-7, Billy Bones wrote:
>>>
>>> Hi folks, I know this is child's play to most of you. I am using google 
>>> docs forms to populate google docs spreadsheets which populate a dashboard 
>>> of google visualization charts on my website. There are times when I would 
>>> just like to take one number from a spreadsheet and post it to my site in a 
>>> customized way. Ideally, I could use large "flip chart" style numbers to 
>>> display the number in my google docs spreadsheet.  I am able to place a 
>>> table on my site to get the information there, but I would like to be able 
>>> to draw individual numbers from my spreadsheet in stylized colors, sizes, 
>>> or fonts.  Any ideas for me?
>>>
>>> Billy  
>>>
>>

-- 
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/-/ZPH4i8Z8IPYJ.
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