Fantastic, thanks for that would you be able to give me an example of how i would implement that into this code?
<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 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(data, options); } </script> On Monday, March 5, 2012 5:49:05 PM UTC, asgallant wrote: > > That change would need to be made in the java source code for the server > applet. I think JAR files are compressed files, you should be able to open > them with something like 7-zip (winzip or winrar should be able to do it > too), and extract the source code within. > > If you want to do it in javascript, you can accomplish the same task with > a bit of a workaround, by using a DataView with calculated columns. For > example, if you had a DataTable with two columns, both of type string, and > you want the first column to stay a string and you want the second to be > evaluated as an integer, then you could do this: > > ​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)); > } > }]); > > chart.draw(view, options); > > On Monday, March 5, 2012 12:30:12 PM UTC-5, R22MPM wrote: >> >> Would i need to do this in the Java Class file rather than in the >> JavaScript on the page? >> >> If so it should be fairly easy to change but how do i edit the JAR or >> Class file? opening in something like Programmers Notepad give a load of >> rubbish text >> >> Thanks >> >> 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/-/cvWmOtvRz1wJ. 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.
