This is a known issue with 1.1. Please refer to this bug thread for more
information:
https://github.com/google/google-visualization-issues/issues/2066

On Fri, Nov 6, 2015 at 2:23 AM Вячеслав В. Шерх <[email protected]> wrote:

>
> *Why draw only one chart? For earlier thanks for the reply. :)*
>
> *Variant №1*
>
> <html>
> <head>
>
> <script type="text/javascript" src="https://www.google.com/jsapi
> "></script>
>
>
> <script type="text/javascript">
>
> google.load("visualization", "1.1", {packages:["bar"]});
>
> *google.setOnLoadCallback(function () {*
> *drawChartProfit();*
> *drawChart();*
> *});*
>
> function drawChart() {
> var data = google.visualization.arrayToDataTable([
> ['Year', 'Sales', 'Expenses', 'Profit'],
>           ['2014', 1000, 400, 200],
>           ['2015', 1170, 460, 250],
>           ['2016', 660, 1120, 300],
>           ['2017', 1030, 540, 350]
>         ]);
>
> var options = {
> chart: {
> title: 'Company Performance',
> subtitle: 'Sales, Expenses, and Profit: 2014-2017',
>           }
>         };
>
> var chart = new
> google.charts.Bar(document.getElementById('columnchart_material'));
>
> chart.draw(data, options);
>       }
>
> function drawChartProfit() {
> var dataProfit = google.visualization.arrayToDataTable([
> ['Year', 'Sales', 'Expenses', 'Profit'],
>           ['2014', 1000, 400, 200],
>           ['2015', 1170, 460, 250],
>           ['2016', 660, 1120, 300],
>           ['2017', 1030, 540, 350]
>         ]);
>
> var optionsProfit = {
> chart: {
> title: 'Company',
> subtitle: 'Profit: 2014-2017',
>           }
>         };
>
> var chartProfit = new
> google.charts.Bar(document.getElementById('columnchart_Profitmaterial'));
>
> chartProfit.draw(dataProfit, optionsProfit);
>       }
>
>
> </script>
>
> </head>
> <body>
> <div id="columnchart_material" style="width: 900px; height: 500px;"></div>
> <br><br>
> <div id="columnchart_Profitmaterial" style="width: 900px; height:
> 500px;"></div>
>
> </body>
> </html>
>
> *Variant №2*
>
> <html>
> <head>
>
> <script type="text/javascript" src="https://www.google.com/jsapi
> "></script>
>
>
> <script type="text/javascript">
>
> google.load("visualization", "1.1", {packages:["bar"]});
>
> * google.setOnLoadCallback(drawChart);*
>
> function drawChart() {
> var data = google.visualization.arrayToDataTable([
> ['Year', 'Sales', 'Expenses', 'Profit'],
>           ['2014', 1000, 400, 200],
>           ['2015', 1170, 460, 250],
>           ['2016', 660, 1120, 300],
>           ['2017', 1030, 540, 350]
>         ]);
>
> var options = {
> chart: {
> title: 'Company Performance',
> subtitle: 'Sales, Expenses, and Profit: 2014-2017',
>           }
>         };
>
> var chart = new
> google.charts.Bar(document.getElementById('columnchart_material'));
>
> chart.draw(data, options);
>       }
> </script>
>
> <script type="text/javascript">
> google.load("visualization", "1.1", {packages:["bar"]});
>
>  *google.setOnLoadCallback(drawChartProfit);*
>
> function drawChartProfit() {
> var dataProfit = google.visualization.arrayToDataTable([
> ['Year', 'Sales', 'Expenses', 'Profit'],
>           ['2014', 1000, 400, 200],
>           ['2015', 1170, 460, 250],
>           ['2016', 660, 1120, 300],
>           ['2017', 1030, 540, 350]
>         ]);
>
> var optionsProfit = {
> chart: {
> title: 'Company Performance',
> subtitle: 'Sales, Expenses, and Profit: 2014-2017',
>           }
>         };
>
> var chartProfit = new
> google.charts.Bar(document.getElementById('columnchart_Profitmaterial'));
>
> chartProfit.draw(dataProfit, optionsProfit);
>       }
> </script>
>
> </head>
> <body>
> <div id="columnchart_material" style="width: 900px; height: 500px;"></div>
> <br><br>
> <div id="columnchart_Profitmaterial" style="width: 900px; height:
> 500px;"></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
> http://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/09f3bdbd-5077-40a3-8173-1eb53b30dbcc%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/09f3bdbd-5077-40a3-8173-1eb53b30dbcc%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 

*[image: unnamed.gif] *
*Sergey Grabkovsky* | SWE  | [email protected]

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAEwwup4_7FhQLgcrSuosvK8qAeN%3D4C_c%2BmLEk4VH%2B%3D%2BpybOqWQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to