Hi, I wasn't able to get your snippet to work (because of all those
controls you're not including in it), but it looks like you're using the
vAxis option wrong. If you'll take a look at the ColumnChart
docs<https://developers.google.com/chart/interactive/docs/gallery/columnchart>,
you'll see that the vAxis option takes an object. You'll also see that
there is an example of what that object should look like. More
specifically, that your vAxis object needs to have a 'title' property. That
change would make your ColumnChart look something like the following:
        var columnChart = new google.visualization.ChartWrapper({
          'chartType': 'ColumnChart',
          'containerId': 'chart1',
          'options': {
            'title': 'Cases',
            'legend': 'right',
            'vAxis': {'title': 'Cases'},
            'width': 1600,
            'height': 800,
            'chartArea': {'left': 15, 'top': 15, 'right': 0, 'bottom': 0},
          },
          // Instruct the piechart to use colums 0 (Name) and 3 (Diarrhea)
          // from the 'data' DataTable.
          'view': {'columns': [0, 4, 5]}
        });

- Sergey


On Mon, Jun 24, 2013 at 7:43 AM, Spencer James <[email protected]> wrote:

> I am new to Google Visualization API, and I'm having trouble with the
> options on this column chart in a ChartWrapper implementation. Specifically
> if I uncomment the vAxis line, the whole thing breaks, and I can't get the
> title to work either. I'd really like to be able to control the horizontal
> and vertical axes and the title.
>
> Any help would be great. Thank you! And it's for a good cause (public
> health).
>
>  // Define a column chart
>         var columnChart = new google.visualization.ChartWrapper({
>           'chartType': 'ColumnChart',
>           'containerId': 'chart1',
>           'options': {
>             'title': 'Cases',
>             'legend': 'right',
>             //'vAxis': 'Cases',
>             'width': 1600,
>             'height': 800,
>             'chartArea': {'left': 15, 'top': 15, 'right': 0, 'bottom': 0},
>           },
>           // Instruct the piechart to use colums 0 (Name) and 3 (Diarrhea)
>           // from the 'data' DataTable.
>           'view': {'columns': [0, 4, 5]}
>         });
>
>         // Define a table
>         var table = new google.visualization.ChartWrapper({
>           'chartType': 'Table',
>           'containerId': 'chart2',
>           'options': {
>             'width': '800px'
>           }
>         });
>
>
>         // Create a dashboard
>         new
> google.visualization.Dashboard(document.getElementById('dashboard')).
>             // Establish bindings, declaring the both the slider and the
> category
>             // picker will drive both charts.
>             bind([slider, categoryPicker, categoryPickerCommune,
> categoryPickerDistrict], [columnChart, table]).
>             // Draw the entire dashboard.
>             draw(data);
>       }
>
>
>  --
> 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/groups/opt_out.
>
>
>

-- 
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/groups/opt_out.


Reply via email to