Sincerely speaking, I have search net for the answer but the one I got 
could not answer  my want. can somebody help me.
what i want is to type date into two  text forms, then create botton, click 
on it. the two dates I type should pass to SELECT O,D WHERE A >= date 
"2015-1-1" and A <= date "2015-1-31"  ORDER BY O and replace date" 
2015-1-1" and date "2015-1-31"  then draw chart   based on those date.this 
is what i have Come up with but deep down me, i know a lot is wrong with 
that code.please help me. I am not a guru but I want to be one day. thanks 
in  advance









<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>Example</title>
        <script type="text/javascript" 
src="https://www.google.com/jsapi";></script>
        <script type="text/javascript">
                var numberschart = 10; //<- Initial value
                google.load('visualization', '1', {packages: 
['corechart']});

                function numbers(){
                        var work_field = 
document.forms['work_form']['work_n_field'].value;
                        var work_field2 = 
document.forms['work_form']['work_n_field2'].value;
                        var work_div = 
document.getElementById('number-work');
                        numberschart = work_div.innerHTML = work_field;
                        numberschart2 = work_div.innerHTML = work_field2;
                        drawVisualization();
                        return false;
             };
 </script> 

<script>

    function loadEditor() {
      // Create the chart to edit.
      
      wrapper = new google.visualization.ChartWrapper({
         'chartType':'LineChart',
         'dataSourceUrl':'https://docs.google.com/spreadsheets/d/
/tq?key=18lJSUJPHFZC-I3nqYD4Y7-2zR-mV63JQb-QxMpzu6hc&pub=0',
         'query':'SELECT O,D WHERE A >= date "2015-1-1" and A <= date 
"2015-1-31"  ORDER BY O',
         'options': {'title':'NUMBERS IN ATTENDANCE', 'legend':'none'}
      });

      chartEditor = new google.visualization.ChartEditor();
      google.visualization.events.addListener(chartEditor, 'ok', 
redrawChart);
      chartEditor.openDialog(wrapper, {});
    }

    // On "OK" save the chart to a <div> on the page.
    function redrawChart(){
      
chartEditor.getChartWrapper().draw(document.getElementById('visualization'));
    }
google.setOnLoadCallback(loadEditor);
        </script>
<script>
  function changeTemp(dir) {
     wrapper .setquery(SELECT O,D WHERE A >= date "'numberschart'" and A <= 
date "'numberschart'"  ORDER BY O, chartEditor.getValue(SELECT O,D WHERE A 
>= date "'numberschart'" and A <= date "'numberschart'"  ORDER BY O) );
    gauge.draw(gaugeData, gaugeOptions);
  }
  </script>
    </head>
    <body>
        
        <form name="work_form" 
 
method="http://spreadsheets.google.com/tq?key=18lJSUJPHFZC-I3nqYD4Y7-2zR-mV63JQb-QxMpzu6hc&pub=0";>
            <label id="n-work-label">Start 
date((year/month/day)</label><input name="work_n_field"/>
            <label id="n-work2-label">End date</label><input 
name="work_n_field2"/>
            <button name="submit" id="submit" value="submit" 
onclick="changeTemp(dir)()">Submit</button>
        </form>
        
     <div id="visualization" style="width: 400px; height: 300px;"></div>
<div id="number-work"></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/6bc653f0-4344-4b58-af3e-f86e5be9b1e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to