I need to graph the number of vehicles, number of casualties and number of 
total rows in a fusion table with the names of each bit of information 
connected to the column. ie:
Casualties |xxxxxxxxxxxxxxxxxxxxxx  Vehicles    |xxxxxxxxxxxxxxxx        
Total Accidents |xxxxxxxxxx                                     
amount        


At the moment, what I've managed to get is: http://i.imgur.com/LsNEodX.png


I've modified an example on Googles' guides that displays data from a 
fusion table in a chart, I've had to put Number_of_Vehicles in twice in 
order to have it set the V axis. I am almost there visually but certain I'm 
very far off with the code and after looking through the documentation I 
haven't found any guides on how to have manually inserted rows of data for 
the chart as well as data from the fusion table.

My code:

<script type="text/javascript">
            google.load('visualization', '1', { packages: ['corechart'] });

            function drawVisualization() {
                google.visualization.drawChart({
                    containerId: 'visualization',
                    dataSourceUrl: 
'http://www.google.com/fusiontables/gvizdata?tq=',
                    query: 'SELECT SUM(Number_of_Vehicles), 
SUM(Number_of_Vehicles), SUM(Number_of_Casualties), COUNT()  FROM 
1wgVs5uXfTIDjccR4CfKI_CUct8YxVjs-NMQx9sp0',
                    chartType: 'BarChart',
                    options: {
                        title: 'Number of casualties to vehicles',
                        vAxis: {
                            title: 'Casualties'
                        },
                        hAxis: {
                            title: 'Amount'
                        }
                    }
                });
            }

            google.setOnLoadCallback(drawVisualization);
        </script>

-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/b549d2a4-2a84-417c-b79a-603dd92f48cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to