Re: [visualization-api] My Chart doesn't appear while combining both bar and pie chart

2016-02-29 Thread 'Sergey Grabkovsky' via Google Visualization API
Hi Tom,

I answered your question in your other thread. In the future, I think one
post per issue will be enough =)

There's a much more detailed explanation in my other post, but the biggest
issue you have is that you have to drawChart functions.

On Fri, Feb 26, 2016 at 8:07 AM tom jose <13165...@gmail.com> wrote:

> My Chart doesn't   appear while combining both bar and pie chart .Here is
> the code:
>
>
> 
>   
> https://www.gstatic.com/charts/loader.js";>
> 
>   google.charts.load('visualization',1,
> {'packages':['bar','corechart']});
>   google.charts.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);
>   }
>
>   google.charts.setOnLoadCallback(drawChart);
>   function drawChart() {
>
> var data = google.visualization.arrayToDataTable([
>   ['Task', 'Hours per Day'],
>   ['Work', 11],
>   ['Eat',  2],
>   ['Commute',  2],
>   ['Watch TV', 2],
>   ['Sleep',7]
> ]);
>
> var options = {
>   title: 'My Daily Activities'
> };
>
> var chart = new
> google.visualization.PieChart(document.getElementById('piechart'));
>
> chart.draw(data, options);
>   }
> 
>   
>   
> 
> 
>   
> 
>
> --
> 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 google-visualization-api+unsubscr...@googlegroups.com.
> To post to this group, send email to
> google-visualization-api@googlegroups.com.
> 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/caf9c073-7a4a-41d2-9abd-d18e3b12e734%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 

*[image: unnamed.gif]• Sergey Grabkovsky• Software Engineer• Google, Inc•
gra...@google.com *

-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
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/CAEwwup6eEx5Qof0FzRnJgDyqt%2Bi6Ye3A-pqdPt1LwZokdxb0XA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] My Chart doesn't appear while combining both bar and pie chart

2016-02-26 Thread tom jose
My Chart doesn't   appear while combining both bar and pie chart .Here is 
the code:



  
https://www.gstatic.com/charts/loader.js";>

  google.charts.load('visualization',1, 
{'packages':['bar','corechart']});
  google.charts.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);
  }
   
  google.charts.setOnLoadCallback(drawChart);
  function drawChart() {

var data = google.visualization.arrayToDataTable([
  ['Task', 'Hours per Day'],
  ['Work', 11],
  ['Eat',  2],
  ['Commute',  2],
  ['Watch TV', 2],
  ['Sleep',7]
]);

var options = {
  title: 'My Daily Activities'
};

var chart = new 
google.visualization.PieChart(document.getElementById('piechart'));

chart.draw(data, options);
  }

  
  


  


-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
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/caf9c073-7a4a-41d2-9abd-d18e3b12e734%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.