Since you left out your data, we can't help much, but you probably have
more than one row with the same domain value or very close values, which
causes the bars to be the minimum width of 1.
If you want each domain value to be treated discretely, not using
continuous axis values, then convert your domain data to strings, or add
hAxis: { type: 'category' }
You should also switch to the newer versions by changing how you load
Google Charts. See
https://developers.google.com/chart/interactive/docs/basic_load_libs#update-library-loader-code
On Wed, Jun 6, 2018 at 1:54 PM New programmer <[email protected]> wrote:
> here is the code that I have been using if it could help anyone figure out
> *where
> I am going wrong*:
>
> <!DOCTYPE html>
> <html>
> <head>
> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
> <title>Commuter Calculator</title>
>
> <script type="text/javascript" src="https://www.google.com/jsapi">
> </script>
>
> <script type="text/javascript">
> google.load("visualization", "1", {packages:["corechart"]});
>
> function initialize() {
> var opts = {sendMethod: 'auto'};
> // Replace the data source URL on next line with your data source
> URL.
> var query = new google.visualization.Query('url……goes….. here',
> opts);
>
> // Optional request to return only column C .
> query.setQuery('select C');
>
> // Send the query with a callback function.
> query.send(handleQueryResponse);
> }
>
> function handleQueryResponse(response) {
> if (response.isError()) {
> alert('Error in query: ' + response.getMessage() + ' ' +
> response.getDetailedMessage());
> return;
> }
>
> var data = response.getDataTable();
>
> var options = {
> title: 'Company Performance',
> bar: {
> groupWidth: 30
> }
>
>
> };
>
> var chart = new
> google.visualization.ColumnChart(document.getElementById('chart_div'));
> chart.draw(data, options);
> }
>
> google.setOnLoadCallback(initialize);
>
> </script>
> </head>
>
> <body>
> <div id="chart_div" style="width: 800px; height: 500px; align:
> center"></div>
> </body>
> </html>
>
> --
> 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/6fc7a6fa-1c8f-455a-b815-52f963b0527d%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/6fc7a6fa-1c8f-455a-b815-52f963b0527d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
[email protected] <[email protected]> 5CC, Cambridge MA
--
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/CAOtcSJNGw6W3WL_m2ujAVgW%3DLiYvWpWWT-9N-3aR3%3DaV0GqJ0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.