Thanks for that, i have tried but unfortunately the gauge is not showing, neither is the data in a table? is there any debugging i can put into this to step through what the code is doing?
<script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load('visualization', '1', {'packages': ['gauge','table','piechart','orgchart','barchart']}); // Set a callback to run when the API is loaded. google.setOnLoadCallback(init); // Send the queries to the data sources. function init() { query = new google.visualization.Query('csv?url=http://localhost:8084/Dashboards/Data/LicenseCount.csv'); query.send(handleCsvLicenseCount); } function handleCsvLicenseCount(response) { if (response.isError()) { alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } var data = response.getDataTable(); var view = new google.visualization.DataView(data); view.setColumns([0, { type: 'number', label: data.getColumnLabel(1), calc: function (dt, row) { return parseInt(dt.getValue(row, 1)); } }]); var options = { width: 400, height: 120, redFrom: 90, redTo: 100, yellowFrom:75, yellowTo: 90, minorTicks: 5 }; var chart = new google.visualization.gauge(document.getElementById('csv_div')); chart.draw(view, options); } </script> <!--[if IE]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> SAMPLE TEXT <div id="csv_div" style="width: 400px"></div> <div id="csv_div1" style="width: 400px"></div> </body> On Friday, March 2, 2012 4:07:10 PM UTC, R22MPM wrote: > > Hi All, > I am a newbie to Coogle charts and have been running through the following > tutorial regarding connecting CSV files into charts. > > > http://code.google.com/apis/chart/interactive/docs/dev/dsl_get_started.html#webapp > > I have a question which im hoping is pretty simple (i have limited JS > knowledge) > > I would like to use Gauge and Bar charts with the CSV data but as i > understand it the columns will always be flagged as string, so my question > is how and where do i convert the value column to a number? > > Thanks > Matt > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/i24r40WhQnQJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
