hello everyone!
while reviewing geochart for a question that was on the board and having watched selwyn's video, i was wondering if i can use geochart with the version 11 i have.
sure you can use. it is very simple to integrate with alpha. mostly i did this via a5w pages but can easily be done with dialog.
the data i took from mysql table, but can be any source.
if we take time to read the documentation from google then the geochart can be fashioned to look beautiful and i am sure the clients will be impressed.
here are some videos for you to see:
geochart part1
http://www.youtube.com/watch?v=tTbzik_Yr_I
geochart part2
http://www.youtube.com/watch?v=bVVEvcWQsbU
geochart part3
http://www.youtube.com/watch?v=UQMoUcLIgEA
any comments suggestions welcome.
edit:
the video on the yutbube is not clear enough to read the code, so here it is:
while reviewing geochart for a question that was on the board and having watched selwyn's video, i was wondering if i can use geochart with the version 11 i have.
sure you can use. it is very simple to integrate with alpha. mostly i did this via a5w pages but can easily be done with dialog.
the data i took from mysql table, but can be any source.
if we take time to read the documentation from google then the geochart can be fashioned to look beautiful and i am sure the clients will be impressed.
here are some videos for you to see:
geochart part1
http://www.youtube.com/watch?v=tTbzik_Yr_I
geochart part2
http://www.youtube.com/watch?v=bVVEvcWQsbU
geochart part3
http://www.youtube.com/watch?v=UQMoUcLIgEA
any comments suggestions welcome.
edit:
the video on the yutbube is not clear enough to read the code, so here it is:
Code:
<html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load('upcoming', {'packages':['geochart']}); google.charts.setOnLoadCallback(drawRegionsMap); function drawRegionsMap() { var data = new google.visualization.DataTable(); data.addColumn('string', 'State'); data.addColumn('number', 'employees'); data.addColumn({ type: 'string', role: 'tooltip', 'p': {'html': true}//added html version }); <%a5 dim cn as sql::Connection dim result as l = .f. dim sqlStatement as c dim rs as sql::ResultSet dim txt as c = "" result = cn.Open("::Name::local_MySql") if result then sqlStatement = "SELECT * FROM company" result = cn.Execute(sqlStatement) if result then rs = cn.ResultSet flag = rs.nextRow() while flag state = rs.data("state") employees = rs.data("number_of_employees") company_name = rs.data("company_name") company_name = strtran(company_name,"'","\'") manager = rs.data("manager") year_founded = rs.data("year_founded") total_sales = rs.data("last_year_sales") txt = txt + "data.addRow(['" + state +"',"+employees+", '"+company_name+"<br/>Manager: " + manager+"<br/>Year Founded: "+year_founded+"<br/>Total Sales: $"+total_sales+".00']);" flag = rs.nextRow() end while end if cn.close() end if ?txt %> var options = { region: 'US', displayMode: 'regions', resolution: 'provinces', tooltip: {isHtml:true} }; var chart = new google.visualization.GeoChart(document.getElementById('regions_div')); chart.draw(data, options); } </script> </head> <body> <div id="regions_div" style="width: 900px; height: 500px;"></div> </body> </html>
Comment