Sorry, found a typo, should be: <script type='text/javascript' src="http://www.google.com/jsapi"></script> <script type="text/javascript"> function drawChart() { var data1 = new google.visualization.DataTable() data1.addColumn('datetime', 'Datum'); data1.addColumn('number', 'Savum'); data1.addColumm('number', 'RPWS1'); data1.addRows([@Html.Raw(rows)]); var chart = new google.visualization.LineChart(document.getElementById('chart_div')); chart.draw(data1, { height: 350, width: 900, title: 'Absolutna kota vode v tesnilni zavesi', vAxis: { maxValue: 165.5, minValue: 159, title: 'absolutna kota' } }); } google.load('visualization', '1', {packages: ['corechart']}); google.setOnLoadCallback(drawChart);
On Monday, February 25, 2013 10:18:31 AM UTC-5, asgallant wrote: > > Oh, you're missing the google loader: > > <script type='text/javascript' src="http://www.google.com/jsapi"></script> > <script type="text/javascript"> > function drawChart() { > var data1 = google.visualization.DataTable() > data1.addColumn('datetime', 'Datum'); > data1.addColumn('number', 'Savum'); > data1.addColumm('number', 'RPWS1'); > data1.addRows([@Html.Raw(rows)]); > var chart = new > google.visualization.LineChart(document.getElementById('chart_div')); > chart.draw(data1, { > height: 350, > width: 900, > title: 'Absolutna kota vode v tesnilni zavesi', > vAxis: { > maxValue: 165.5, > minValue: 159, > title: 'absolutna kota' > } > }); > } > google.load('visualization', '1', {packages: ['corechart']}); > google.setOnLoadCallback(drawChart); > > On Monday, February 25, 2013 1:42:15 AM UTC-5, Matevz Uros Pavlic wrote: >> >> Sure thing...here it is (attached). >> >> Thanks! >> >> m >> >> 2013/2/25 asgallant <[email protected]> >> >>> Post the rendered javascript again, I'll take a look. >>> >>> >>> On Monday, February 25, 2013 12:45:33 AM UTC-5, Matevz Uros Pavlic wrote: >>>> >>>> Hi, >>>> >>>> i don't why, but it still doesn't do anything. The server render is >>>> like this: >>>> <script type='text/javascript' >>>> src="http://www.google.com/**jsapi<http://www.google.com/jsapi> >>>> "></script> <script type="text/javascript"> function drawChart() { var >>>> data1 = google.visualization.**DataTable() data1.addColumn('datetime', >>>> 'Datum'); data1.addColumn('number', 'Sava'); data1.addColumn('number', >>>> 'RPWS1'); >>>> But the chart don't show up. It's strange that even with the typo, >>>> column RPWS1 was still added in DataTable. >>>> >>>> I don't know what to do anymore... >>>> >>>> >>>> >>>> -- >>> 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?hl=en. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
