0
 <!DOCTYPE html>
 <html class="no-js" lang="ru">

 <head>
 <meta charset="utf-8">
 <meta content="ie=edge" http-equiv="x-ua-compatible">
 <title></title>
 <script src="https://www.gstatic.com/charts/loader.js"></script>
 </head>

<body>

  <div>
  <script >
   google.charts.load('current', {
    packages: ['table']
  });
  var visualization;

  function drawVisualization() {
    var query = new  google.visualization.Query(
  'https://docs.google.com/spreadsheets/d/
    0Ala2iojq85L1NJWodUMVBDI45oCbryN2BHIC 
    31MRVo/edit?usp=sharing');
    query.setQuery('SELECT A, B, C');
    query.send(handleQueryResponse);
   }

  function handleQueryResponse(response) {
    if (response.isError()) {
        alert('There was a problem with your query: ' + response.getMessage() 
     + ' ' + response.getDetailedMessage());
        return;
    }
    var data = response.getDataTable();
    visualization = new 
    google.visualization.Table(document.getElementById('table'));
    visualization.draw(data, {
        allowHtml: true,
        legend: 'bottom'
    });
  }
  google.setOnLoadCallback(drawVisualization);
  </script>
  <div id="table"> </div>
  <div id="table_I"> </div>
  <div id="table_II"> </div>
  </div>

  </body>

  </html>

1 ответ 1

0
   <html class="no-js" lang="ru">
    <head>
    <meta charset="utf-8">
    <script src="https://www.gstatic.com/charts/loader.js"></script>
    </head>
    <body>  
     <div id="box">    
    <div id="table"></div>
    </div>

    <div id="box2">    
    <div id="table2"></div>
    </div>
  
  <div id="box3">    
    <div id="table3"></div>
  </div>

  <script>
    google.charts.load('current', {
      packages: ['table']
    }).then(function () {
      var query = new google.visualization.Query(
        'https://docs.google.com/spreadsheets/d/
      1fZC3s3reYRHxJQmJb06ntFAUKRNG7dZstYjyqQQDkbM/edit?usp=sharing');
      query.setQuery('SELECT A, B, C');
      query.send(function (response) {
        handleQueryResponse(response, 'table');
      });      

      var query = new google.visualization.Query(
        'https://docs.google.com/spreadsheets/d/1lxshiQMOVeCXIg- 
      0jed8fke_TW6dcuFwuSAAJa5Duxg/edit?usp=sharing');
      query.setQuery('SELECT A, B, C');
      query.send(function (response) {
        handleQueryResponse(response, 'table2');
      });

      var query = new google.visualization.Query(   
     'https://docs.google.com/spreadsheets/d
     /1fZC3s3reYRHxJQmJb06ntFAUKRNG7dZstYjyqQQDkbM/edit? 
       usp=sharing');
      query.setQuery('SELECT A, B, C');
      query.send(function (response) {
        handleQueryResponse(response, 'table3');
      });

      function handleQueryResponse(response, id) {
        if (response.isError()) {
          alert('There was a problem with your query: ' + response.getMessage() + ' ' + 
       response
          .getDetailedMessage());
          return;
        }

        var data = response.getDataTable();
        visualization = new google.visualization.Table(document.getElementById(id));
        visualization.draw(data, {
          allowHtml: true,
          legend: 'bottom'
        });
      }
    });
    </script>
    </body>
    </html>

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.