{"id":17987,"date":"2015-10-28T05:01:20","date_gmt":"2015-10-27T19:01:20","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=17987"},"modified":"2015-10-27T15:29:06","modified_gmt":"2015-10-27T05:29:06","slug":"google-chart-select-event-spreadsheet-integration-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-select-event-spreadsheet-integration-tutorial\/","title":{"rendered":"Google Chart Select Event Spreadsheet Integration Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Google Chart Select Event Spreadsheet Integration Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/spreadsheet_integration.jpg\" title=\"Google Chart Select Event Spreadsheet Integration Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Google Chart Select Event Spreadsheet Integration Tutorial<\/p><\/div>\n<p>We&#8217;re trying more &#8220;genericity&#8221; with our Google Graphs API, or Google Chart Tools, web and mobile applications today, building on yesterday&#8217;s <a target=_blank title='Google Chart Line\/Bar\/Area\/Column Select Event Tutorial' href='#gclbacset'>Google Chart Line\/Bar\/Area\/Column Select Event Tutorial<\/a>, as shown below, with integration involving <a target=_blank title='Spreadsheet information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Spreadsheet'>spreadsheets<\/a>, that we are first trying on our recent &#8220;guinea pig&#8221; functionalities (of recent times) &#8230;<\/p>\n<ul>\n<li>Area Chart<\/li>\n<li>Bar Chart (and Bar Chart Differences)<\/li>\n<li>Column Chart (and Column Chart Differences)<\/li>\n<li>Line Chart<\/li>\n<li>Map Chart<\/li>\n<\/ul>\n<p>It probably comes as no surprise that chart data can be turned into spreadsheet data, especially if you have ever spent much time in those great spreadsheet applications like Microsoft Office&#8217;s <a target=_blank title='Excel information from Microsoft' href='https:\/\/products.office.com\/en-us\/excel'>Excel<\/a>, where there are various pathways to display charts from your spreadsheet data.  So, today, we just turn that thought around a bit, and use Comma Separated Value (CSV) files as a conduit to be able to convert our chart data into a spreadsheet.  We leave it up to whatever is the default application you have to open CSV files &#8230; it doesn&#8217;t even have to be a spreadsheet application as such, but our applications today offer a downloading capability to get the spreadsheet (CSV) data down to your hard disk (or perhaps midair solutions like Google Docs).<\/p>\n<p>So we see this as a good candidate as a generic Google Chart &#8220;select&#8221; event tool for users looking to integrate with spreadsheet tools.<\/p>\n<p>These Google Chart Line\/Bar\/Area\/Column\/Map Chart changes involved &#8230;<\/p>\n<ul>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/AreaChart\/area_chart.php---GETME\" title=\"area_chart.php\" target=\"_blank\">area_chart.php<\/a> is the changed PHP programming source code as per <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/AreaChart\/area_chart.php---GETME\" title=\"area_chart.php\" target=\"_blank\">changes<\/a><\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/BarChart\/bar_chart.php----GETME\" title=\"bar_chart.php\" target=\"_blank\">bar_chart.php<\/a> (<a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/BarChart\/bar_chart_diff.php---GETME\" title=\"bar_chart_diff.php\" target=\"_blank\">bar_chart_diff.php<\/a>) is the changed PHP programming source code as per <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/BarChart\/bar_chart.php----GETME\" title=\"bar_chart.php\" target=\"_blank\">changes<\/a> (and <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/BarChart\/bar_chart_diff.php---GETME\" title=\"bar_chart_diff.php.php\" target=\"_blank\">changes<\/a>)<\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/ColumnChart\/column_chart.php----GETME\" title=\"column_chart.php\" target=\"_blank\">column_chart.php<\/a> (<a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/ColumnChart\/column_chart_diff.php---GETME\" title=\"column_chart_diff.php\" target=\"_blank\">column_chart_diff.php<\/a>) is the changed PHP programming source code as per <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/ColumnChart\/column_chart.php----GETME\" title=\"colimn_chart.php\" target=\"_blank\">changes<\/a> (and <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/ColumnChart\/column_chart_diff.php---GETME\" title=\"column_chart_diff.php.php\" target=\"_blank\">changes<\/a>)<\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php----GETME\" title=\"line_chart.php\" target=\"_blank\">line_chart.php<\/a> is the changed PHP programming source code as per <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php----GETME\" title=\"line_chart.php\" target=\"_blank\">changes<\/a><\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Map\/map.php------GETME\" title=\"map.php\" target=\"_blank\">map.php<\/a> is the changed PHP programming source code as per <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Map\/map.php------GETME\" title=\"map.php\" target=\"_blank\">changes<\/a><\/li>\n<\/ul>\n<p>You&#8217;ll see with the PHP code that a crucial technique with today&#8217;s work, which involves huge use of PHP&#8217;s <a target=_blank title='PHP header method' href='http:\/\/php.net\/manual\/en\/function.header.php'>header<\/a> method, revolves around the use of the PHP <a target=_blank title='PHP include information' href='http:\/\/php.net\/manual\/en\/function.include.php'>include<\/a> statement (as well as its closely related <i>require<\/i> statement).  What we &#8220;included&#8221; in the PHP of above was PHP source code <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/csv.php_GETME\" title=\"csv.php\" target=\"_blank\">csv.php<\/a> to aid with constructing the PHP header statements necessary to make the functionality happen.  We&#8217;d like to thank this <a target=_blank title='Very useful link ... thanks' href='http:\/\/stackoverflow.com\/questions\/4348802\/how-can-i-output-a-utf-8-csv-in-php-that-excel-will-read-properly'>very useful link<\/a> for help here.<\/p>\n<p>Link to Google Chart Tools &#8220;spiritual home&#8221; &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.\n'>via Google<\/a>.<br \/>\nLink to Google Chart Tools Area Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/areachart' title='Google Area Charts'>via Google<\/a>.<br \/>\nLink to Google Chart Tools Bar Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/barchart' title='Google Bar Charts'>via Google<\/a>.<br \/>\nLink to Google Chart Tools Column Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/columnchart' title='Google Column Charts'>via Google<\/a>.<br \/>\nLink to Google Chart Tools Line Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/linechart' title='Google Line Charts'>via Google<\/a>.<br \/>\nLink to Google Chart Tools Map Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/map' title='Google Map Charts'>via Google<\/a>.<\/p>\n<p>This extra functionality, available via the suffix \u201c&#038;onclick=y\u201d applied to the Google Chart Area and Bar and Column and Line and Map Chart title, flows on directly to the iPad iOS App we created and talked about, last, with <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/xcode-swift-ios-application-end-game-primer-tutorial\/' title='Xcode Swift iOS Application End Game Primer Tutorial'>Xcode Swift iOS Application End Game Primer Tutorial<\/a>.<\/p>\n<p>So please try creating your own emailable Google Chart live runs for &#8230;<\/p>\n<ul>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/AreaChart\/area_chart.php\" title=\"area_chart.php\" target=\"_blank\">Area Chart<\/a><\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/BarChart\/bar_chart.php\" title=\"bar_chart.php\" target=\"_blank\">Bar Chart<\/a><\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/ColumnChart\/column_chart.php\" title=\"column_chart.php\" target=\"_blank\">Column Chart<\/a><\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php\" title=\"line_chart.php\" target=\"_blank\">Line Chart<\/a><\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Map\/map.php\" title=\"line_chart.php\" target=\"_blank\">Map Chart<\/a><\/li>\n<\/ul>\n<p><font size=1>No guinea pigs were harmed in the making of this blog post.<\/font> <font size=2>Honest, guv&#8217;!<\/font><\/p>\n<hr>\n<p id='gclbacset'>Previous relevant <a target=_blank title='Google Chart Line\/Bar\/Area\/Column Select Event Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/Google Chart Line\/Bar\/Area\/Column-select-event-tutorial\/'>Google Chart Line\/Bar\/Area\/Column Select Event Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Google Chart Line\/Bar\/Area\/Column Select Event Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.png\" title=\"Google Chart Line\/Bar\/Area\/Column Select Event Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Google Chart Line\/Bar\/Area\/Column Select Event Tutorial<\/p><\/div>\n<p>Today we continue on (from yesterday&#8217;s <a target=_blank title='Google Chart Line and Map Chart Select Event Prompt Tutorial' href='#gclamcsept'>Google Chart Line and Map Chart Select Event Prompt Tutorial<\/a>) with more integration involving Google Graphs API, or Google Chart Tools, and its &#8220;select&#8221; event (like <i>onclick<\/i>) involving &#8230;<\/p>\n<ul>\n<li>Area Chart<\/li>\n<li>Bar Chart (and Bar Chart Differences)<\/li>\n<li>Column Chart (and Column Chart Differences)<\/li>\n<li>Line Chart<\/li>\n<\/ul>\n<p> &#8230; involve similar data requirements, so we can integrate by offering a redraw of the Google Chart you are currently in, to another type of Google Chart in the list above, and allow this, as an additional &#8220;business logic&#8221; piece of functionality offered to users when they &#8220;click\/touch&#8221; on the Google Chart, firing off the <i>onclick<\/i> (or Google Chart &#8220;select&#8221;) event.<\/p>\n<p>This piece of functionality can be useful, even in terms of aesthetics, as some Google Charts display better than others depending on the density of the data set(s) displayed.<\/p>\n<p>Along the way we also present to the user a moving average of values relevant to each data column of interest.<\/p>\n<p>From yesterday, you may also recall that we can allow a redraw of one the Google Chart types as above (and for lots of others eventually) by allowing user amendment of the data.<\/p>\n<p>And from the day before yesterday we outlined that first bit of &#8220;select&#8221; event business logic allowing the user to see the difference between values, on &#8220;click\/touching&#8221; any one of them and on doing this firing the &#8220;select&#8221; event.<\/p>\n<p>These Google Chart Line\/Bar\/Area\/Column Chart changes involved &#8230;<\/p>\n<ul>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/AreaChart\/area_chart.php--GETME\" title=\"area_chart.php\" target=\"_blank\">area_chart.php<\/a> is the changed PHP programming source code as per <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/AreaChart\/area_chart.php--GETME\" title=\"map.php\" target=\"_blank\">changes<\/a><\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/BarChart\/bar_chart.php---GETME\" title=\"bar_chart.php\" target=\"_blank\">bar_chart.php<\/a> (<a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/BarChart\/bar_chart_diff.php--GETME\" title=\"bar_chart_diff.php\" target=\"_blank\">bar_chart_diff.php<\/a>) is the changed PHP programming source code as per <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/BarChart\/bar_chart.php---GETME\" title=\"map.php\" target=\"_blank\">changes<\/a> (and <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/BarChart\/bar_chart_diff.php--GETME\" title=\"bar_chart_diff.php.php\" target=\"_blank\">changes<\/a>)<\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/ColumnChart\/column_chart.php---GETME\" title=\"column_chart.php\" target=\"_blank\">column_chart.php<\/a> (<a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/ColumnChart\/column_chart_diff.php--GETME\" title=\"column_chart_diff.php\" target=\"_blank\">column_chart_diff.php<\/a>) is the changed PHP programming source code as per <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/ColumnChart\/column_chart.php---GETME\" title=\"map.php\" target=\"_blank\">changes<\/a> (and <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/ColumnChart\/column_chart_diff.php--GETME\" title=\"column_chart_diff.php.php\" target=\"_blank\">changes<\/a>)<\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php----GETME\" title=\"line_chart.php\" target=\"_blank\">line_chart.php<\/a> is the changed PHP programming source code as per <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php----GETME\" title=\"line_chart.php\" target=\"_blank\">changes<\/a><\/li>\n<\/ul>\n<p>Link to Google Chart Tools &#8220;spiritual home&#8221; &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.\n'>via Google<\/a>.<br \/>\nLink to Google Chart Tools Area Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/areachart' title='Google Area Charts'>via Google<\/a>.<br \/>\nLink to Google Chart Tools Bar Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/barchart' title='Google Bar Charts'>via Google<\/a>.<br \/>\nLink to Google Chart Tools Column Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/columnchart' title='Google Column Charts'>via Google<\/a>.<br \/>\nLink to Google Chart Tools Line Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/linechart' title='Google Line Charts'>via Google<\/a>.<\/p>\n<p>This extra functionality, available via the suffix \u201c&#038;onclick=y\u201d applied to the Google Chart Area and Bar and Column and Line Chart title, flows on directly to the iPad iOS App we created and talked about, last, with <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/xcode-swift-ios-application-end-game-primer-tutorial\/' title='Xcode Swift iOS Application End Game Primer Tutorial'>Xcode Swift iOS Application End Game Primer Tutorial<\/a>.<\/p>\n<p>So please try creating your own emailable Google Chart live runs for &#8230;<\/p>\n<ul>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/AreaChart\/area_chart.php\" title=\"area_chart.php\" target=\"_blank\">Area Chart<\/a><\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/BarChart\/bar_chart.php\" title=\"bar_chart.php\" target=\"_blank\">Bar Chart<\/a><\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/ColumnChart\/column_chart.php\" title=\"column_chart.php\" target=\"_blank\">Column Chart<\/a><\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php\" title=\"line_chart.php\" target=\"_blank\">Line Chart<\/a><\/li>\n<\/ul>\n<hr>\n<p id='gclamcsept'>Previous relevant <a target=_blank title='Google Chart Line and Map Chart Select Event Prompt Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-line-and-map-chart-select-event-prompt-tutorial\/'>Google Chart Line and Map Chart Select Event Prompt Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Google Chart Line and Map Chart Select Event Prompt Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.gif\" title=\"Google Chart Line and Map Chart Select Event Prompt Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Google Chart Line and Map Chart Select Event Prompt Tutorial<\/p><\/div>\n<p>Here is a tutorial that further reacquaints you, maybe, with the Google Graphs API, or Google Chart Tools, and its Line Chart functionality, last talked about at this blog with <a target=_blank title='PHP\/Javascript\/HTML Google Chart Line Chart Tutorial' href='#pjhgclct'>PHP\/Javascript\/HTML Google Chart Line Chart Tutorial<\/a> as shown way below, and <a target=_blank title='Google Chart Map Chart' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=4832'>Map Chart<\/a>, for its first mention and <a target=_blank title='Google Chart Map Chart Select Event Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-map-chart-select-event-primer-tutorial\/'>Google Chart Map Chart Select Event Primer Tutorial<\/a>, for its last mention.<\/p>\n<p>There is no magic relationship between these two chart types today, rather it is the case that they are the &#8220;guinea pigs&#8221; for &#8220;generic thoughts&#8221;.<\/p>\n<p>&#8220;Generic&#8221; is a favourite word for what we try to achieve here, but it can be like &#8220;nirvana&#8221; for lots of reasons &#8230;<\/p>\n<ul>\n<li>do you have a market for the investment you need to put in to push for &#8220;genericity&#8221;<\/li>\n<li>in similar mind, does the project size make it worthwhile<\/li>\n<li>is catering for all the web browser and application platforms allow for &#8220;genericity&#8221; anyway?<\/li>\n<\/ul>\n<p> &#8230; in a big organization, such queries can progress quite nicely by using teams and having planning discussions and setting timelines and deadlines between project groups, but in smaller teams it can be the case of &#8220;seeing what problems&#8221; come up, to decide on the push for &#8220;genericity&#8221; with the product, down, eventually, to the level of deciding where &#8220;business logic&#8221; code should sit (ie. in a &#8220;library&#8221; or &#8220;called&#8221; piece of code, or otherwise).  So, we&#8217;re trying some &#8220;generic&#8221; thoughts and using these two disparate Google Charts to see whether there is some <i>onclick<\/i> (ie. Google Charts &#8220;select&#8221; event, which you can read a lot about <a target=_blank title='Google Chart events' href='https:\/\/developers.google.com\/chart\/interactive\/docs\/events?hl=en'>here<\/a> &#8230; thanks, Google) logic that, in a business sense (because we like to think of <i>onclick<\/i> being really closely tied to &#8220;business logic&#8221;, the reason being, some user &#8220;clicked\/touched&#8221; something, so you better present something heading towards specific interest, to do with business, when they do this.<\/p>\n<p>And we think an approach would be to offer an <i>onclick<\/i> reworking of the data of a chart should they get to the &#8220;click\/touch&#8221; stage with a chart.  And we decided that it is not so bad to present this in an overall &#8220;one string&#8221; chance to change the chart, because, presumanly the user went through the whole rigmarole of answering questions to get this far, and by this stage will &#8220;get the hang&#8221; of what to do to make more sweeping changes by using this new functionality.  Think, too, a &#8220;faster way to do things&#8221; presented to &#8220;advanced users&#8221; willing to give things a go (otherwise they wouldn&#8217;t still be reading?!) help to improve the UX (&#8220;user experience&#8221;) of the application, whether that be web or mobile or desktop or seascape (just checking you&#8217;re still awake).<\/p>\n<p>And so, in practical terms, with these two charts, we&#8217;ve recently added <i>onclick<\/i> (Google Charts &#8220;select&#8221; event) Javascript alert and <a target=_blank title='Javascript prompt window information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_prompt.asp'>prompt<\/a> boxes recently, respectively, for Line Charts and Map Charts.  Well, today, we make them both Javascript prompt windows to offer this chance for the user to &#8220;reshape&#8221; their chart via &#8220;click\/touch&#8221; chart control.<\/p>\n<p>These Google Chart Line Chart and Map Chart changes involved &#8230;<\/p>\n<ul>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php---GETME\" title=\"line_chart.php\" target=\"_blank\">line_chart.php<\/a> is the changed PHP programming source code as per <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php---GETME\" title=\"line_chart.php\" target=\"_blank\">changes<\/a><\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Map\/map.php-----GETME\" title=\"map.php\" target=\"_blank\">map.php<\/a> is the changed PHP programming source code as per <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Map\/map.php-----GETME\" title=\"map.php\" target=\"_blank\">changes<\/a><\/li>\n<\/ul>\n<p>Link to Google Chart Tools &#8220;spiritual home&#8221; &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.\n'>via Google<\/a>.<br \/>\nLink to Google Chart Tools Line Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/linechart' title='Google Line Charts'>via Google<\/a>.<br \/>\nLink to Google Chart Tools Map Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/map' title='Google Map Charts'>via Google<\/a>.<\/p>\n<p>This extra functionality, available via the suffix \u201c&#038;onclick=y\u201d applied to the Google Chart Map Chart title, flows on directly to the iPad iOS App we created and talked about, last, with <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/xcode-swift-ios-application-end-game-primer-tutorial\/' title='Xcode Swift iOS Application End Game Primer Tutorial'>Xcode Swift iOS Application End Game Primer Tutorial<\/a>.<\/p>\n<p>So please try creating you own emailable Google Chart Line Chart <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php'>here<\/a> or Map Chart <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Map\/map.php'>here<\/a>.<\/p>\n<hr>\n<p id='pjgclcset'>Previous Previous relevant <a target=_blank title='PHP\/Javascript Google Chart Line Chart Select Event Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/phpjavascript-google-chart-line-chart-select-event-tutorial\/'>PHP\/Javascript Google Chart Line Chart Select Event Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP\/Javascript Google Chart Line Chart Select Event Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.jpg\" title=\"PHP\/Javascript Google Chart Line Chart Select Event Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP\/Javascript Google Chart Line Chart Select Event Tutorial<\/p><\/div>\n<p>Here is a tutorial that reacquaints you, perhaps, with the Google Graphs API, or Google Chart Tools, and its Line Chart functionality, first talked about at this blog with <a target=_blank title='PHP\/Javascript\/HTML Google Chart Line Chart Tutorial' href='#pjhgclct'>PHP\/Javascript\/HTML Google Chart Line Chart Tutorial<\/a> as shown below.<\/p>\n<blockquote><p>Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.<\/p><\/blockquote>\n<p>The reason for the revisit concerns a push to make more use of the <i>onclick<\/i> &#8220;feeling&#8221; Google Chart &#8220;select&#8221; event, an event triggered when you click on a feature of, in this case, a Google Chart Line Chart that our web application helps you create.<\/p>\n<p>Here is some <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php'>PHP<\/a> code in live action for this tutorial where you define your line chart characteristics and data, where am appending of &#8220;<i>&#038;onclick=y<\/i>&#8221; to your line chart title means the additional &#8220;select&#8221; event functionality can kick in.<\/p>\n<p>The &#8220;select&#8221; event functionality (which you can read a lot about <a target=_blank title='Google Chart events' href='https:\/\/developers.google.com\/chart\/interactive\/docs\/events?hl=en'>here<\/a> &#8230; thanks, Google) would be full of business logic and specific to how you want to use the chart, so it is a bit hard to pin down how you should use it, but in today&#8217;s tutorial <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.jpg'>picture<\/a> you can see that in a Company Performance line chart showing Sales and Expenses if you click on a Sales figure for any given Year the &#8220;select&#8221; event business logic brings up a Javascript alert() box that informs the user of the Expenses for that same Year, along with the difference between Sales and Expenses.  The logic is not tied down to the exact words &#8220;Sales&#8221; and &#8220;Expenses&#8221;, and it will work this out from what you entered in for this earlier on.<\/p>\n<p>Some findings here led to some small changes to that generic Javascript behind the scenes of these Google Chart suite of web applications as well so, all told, the changes involved &#8230;<\/p>\n<ul>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php--GETME\" title=\"line_chart.php\" target=\"_blank\">line_chart.php<\/a> is the changed PHP programming source code as per <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php--GETME\" title=\"line_chart.php\" target=\"_blank\">changes<\/a><\/li>\n<li><a href=\"http:\/\/www.rjmprogramming.com.au\/gchartgen.js----GETME\" title=\"gchartgen.js--GETME\" target=\"_blank\">gchartgen.js<\/a> is the changed Javascript programming source code as per <a href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/gchartgen.js----GETME\" title=\"gchartgen.js--GETME\" target=\"_blank\">changes<\/a><\/li>\n<\/ul>\n<p>Link to Google Chart Tools &#8220;spiritual home&#8221; &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.\n'>via Google<\/a>.<br \/>\nLink to Google Chart Tools Line Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/linechart' title='Google Line Charts'>via Google<\/a>.<\/p>\n<p>So please try creating you own emailable Google Chart Line Chart <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php'>here<\/a>.<\/p>\n<hr>\n<p id='pjhgclct'>Previous relevant <a target=_blank title='PHP\/Javascript\/HTML Google Chart Line Chart Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/phpjavascripthtml-google-chart-line-chart-tutorial\/'>PHP\/Javascript\/HTML Google Chart Line Chart Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP\/Javascript\/HTML Google Chart Line Chart Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/LineChart.jpg\" title=\"PHP\/Javascript\/HTML Google Chart Line Chart Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP\/Javascript\/HTML Google Chart Line Chart Tutorial<\/p><\/div>\n<p>Here is a tutorial that introduces you to Google Graphs API, or Google Chart Tools, and its Line Chart functionality.<\/p>\n<blockquote><p>Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.<\/p><\/blockquote>\n<p>Let&#8217;s see some  <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php'>PHP<\/a> code in live action for this tutorial where you define your line chart characteristics and data.<\/p>\n<p>Link to Google Chart Tools &#8220;spiritual home&#8221; &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.\n'>via Google<\/a>.<br \/>\nLink to Google Chart Tools Line Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/linechart' title='Google Line Charts'>via Google<\/a>.<\/p>\n<p>Link to some downloadable PHP programming code &#8230; rename to <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/LineChart\/line_chart.php_GETME' title='Download me'>line_chart.php<\/a>.\n<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d1731' onclick='var dv=document.getElementById(\"d1731\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=Google+Chart#content\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d1731' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d17927' onclick='var dv=document.getElementById(\"d17927\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/onclick\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d17927' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d17950' onclick='var dv=document.getElementById(\"d17950\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/prompt-popup-box\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d17950' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d17965' onclick='var dv=document.getElementById(\"d17965\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/php\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d17965' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d17987' onclick='var dv=document.getElementById(\"d17987\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/csv\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d17987' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;re trying more &#8220;genericity&#8221; with our Google Graphs API, or Google Chart Tools, web and mobile applications today, building on yesterday&#8217;s Google Chart Line\/Bar\/Area\/Column Select Event Tutorial, as shown below, with integration involving spreadsheets, that we are first trying on &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/google-chart-select-event-spreadsheet-integration-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[283,360,513,518,576,614,630,652,861,932,997,1000,1185,1319,1350,1356],"class_list":["post-17987","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-csv","tag-download","tag-google","tag-google-chart","tag-html","tag-integration","tag-ipad","tag-javascript","tag-onclick","tag-php","tag-programming","tag-prompt-popup-box","tag-spreadsheet","tag-tutorial","tag-user-experience","tag-ux"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/17987"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=17987"}],"version-history":[{"count":7,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/17987\/revisions"}],"predecessor-version":[{"id":17998,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/17987\/revisions\/17998"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=17987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=17987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=17987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}