Hi ,
   I'm running from the IBM ZOS Unix system server and can issue the sample 
linechart successfully if I hard code values as see below.  If I add a REXX 
do loop to the data and build the addrows, My source returns a chart 
without data.  If I HARD code the say statements, it works and I can see it 
in the browser.  I'm reading in a file via readfile and parsing the values 
via rexx.   Any ideas ?  I  

        Thanks in advance !
           
Michael                                                             


----  Native output from rexx (showing the rexx variable ARE being 
populated on the mainframe) ----

 SYccc  E    /tmp/cccccc 15:18:33.915861.stdout.ishell Line 00000000 Col 
001 080 
 Command ===>                                                  Scroll ===> 
PAGE 
***********                   *** Top of Data 
**********************************
Content-typ   Exit status=0   
t=UTF-8                                           
                                                                                

<!DOCTYPE 
HTML>                                                                 
<title> TEST 
PIEL</title>                                                       
<html>                                                                          

<head>                                                                          

 <script type="text/javascript" src="
https://www.gstatic.com/charts/loader.js";><
 <script 
type="text/javascript">                                                
    google.charts.load('current', {packages: 
Ý'corechart'¨});                   
    
google.charts.setOnLoadCallback(drawVisualization);                         
    function drawVisualization() 
{                                              
      // Define the chart to be 
drawn.                                          
      var dataTable = new 
google.visualization.DataTable();                     
      dataTable.addColumn('datetime', 'Time of 
Day');                           
      dataTable.addColumn('number', 'Trans per 
Min.');                          
      dataTable.addColumn('number', 'Trans per 
hour');                          
      
dataTable.addRows(Ý                                                       
Ýnew Date("01/02/2015 16:01"), 
5,10¨,                                           
Ýnew Date("01/02/2015 16:02"), 
15,3¨,                                           
Ýnew Date("01/02/2015 16:03"), 19,4¨);                                          

      // Instantiate and draw the 
chart.                                        
var formatter = new google.visualization.DateFormat({pattern: 
'yyyy/MM/dd'});   
    var options = 
{                                                             
          title: 'Rate the Day on a Scale of 1 to 
10',                          
          width: 
900,                                                           
          height: 
500,                                                          
          hAxis: 
{                                                              
            format: 'yyyy mm dd hh 
ss',                                         
            gridlines: {count: 
15}                                              
          
},                                                                    
          vAxis: 
{                                                              
            gridlines: {color: 
'none'},                                         
            minValue: 
0                                                         
-----------------------------------------------------------------------------------------------



------------------------------   Source browser output 
---------------------------------

<!DOCTYPE HTML> 

<title> TEST PIEL</title>

<html>

<head>

<script type="text/javascript" src
="https://www.gstatic.com/charts/loader.js";></script>

<script type="text/javascript">

google.charts.load('current', {packages: ['corechart']});

google.charts.setOnLoadCallback(drawVisualization);

function drawVisualization() {

// Define the chart to be drawn. 

var dataTable = new google.visualization.DataTable();

dataTable.addColumn('datetime', 'Time of Day'); 

dataTable.addColumn('number', 'Trans per Min.'); 

dataTable.addColumn('number', 'Trans per hour'); 

dataTable.addRows([

// Instantiate and draw the chart. 

var formatter = new google.visualization.DateFormat({pattern: 'yyyy/MM/dd'
});

var options = {

title: 'Rate the Day on a Scale of 1 to 10',

width: 900,

height: 500,

hAxis: {

format: 'yyyy mm dd hh ss',

gridlines: {count: 15}

},

vAxis: {

gridlines: {color: 'none'},

minValue: 0

}

};

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

chart.draw(dataTable, {curveType: "function"});

} 

</script> 

</head> 

<body> 

<!-- Identify where the chart should be drawn. --> 

<div id="visualization"/>

</body>

</html>

------------------------------------------- / end browser




---------------- REXX source code ----


say 'Content-type: text/html;charset=UTF-8'                        
                                                                   
/* Next line - very important */                                   
/* It separates the HTTP header from the body of the reponse */    
/* Do no delete it */                                              
                                                                   
say ''                                                             
                                                                   
                                                                   
say'<!DOCTYPE HTML> '                                              
say'<title> TEST PIEL</title>'                                     
say'<html>'                                                        
say'<head>'                                                        
say' <script type="text/javascript" src="'loadit'"></script>'      
say' <script type="text/javascript">'                              
say"    google.charts.load('current', {packages: Ý'corechart'¨});" 
say"    google.charts.setOnLoadCallback(drawVisualization);"       
say"    function drawVisualization() {"                            
say"      // Define the chart to be drawn. "                       
say"      var dataTable = new google.visualization.DataTable();"   
say"      dataTable.addColumn('datetime', 'Time of Day'); "        
say"      dataTable.addColumn('number', 'Trans per Min.'); "       
say"      dataTable.addColumn('number', 'Trans per hour'); "       
say"      dataTable.addRows("'AD'x                                 
Do cnt = 1 to nd.0                                                 
 If cnt ¬= nd.0 Then                                               
  Do                                                               
   say 'AD'x||nd.cnt||'BD'x||','                                   
  End                                                              
 Else                                                              
  Do                                                               
   say 'AD'x||nd.cnt||'BD'x||");"                                  
  End                                                              
end                                                                
                                                                   

-- 
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/3e7424d7-d4a9-47a8-8769-8dfa11f5a1d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to