I'm not sure if this helps you specifically, but I can think of two ways 
text boxes can be linked to Google Charts. Because of the way some of the 
sites I use are set up, some are CMSs which I have only limited access to, 
so I mostly use Google Sheets to hold the data, but the principles should 
still be same.

You can take the content of a textbox and use that to build a query to your 
data if it supports SQL or something similar. The result from the query 
than can be used to create the chart. The reference for doing that is at 
https://developers.google.com/chart/interactive/docs/queries 

There is also a test: function() that was added some time in 2014 - 
https://groups.google.com/forum/#!topic/google-visualization-api/iOOO4TQfcEE 
and 
which is still not very well documented, but it does work. The JS Fiddle 
associated with that thread is at http://jsfiddle.net/0h7fxsLu/ The only 
reference to it that I know of in the documentation is at 
https://developers.google.com/chart/interactive/docs/reference bit it's 
only mentioned in passing with no real description of what it does, 

I know it works because I use it for a user dropdown search function on 
https://indstate.edu/business/Meis-Center/calendar and you should be able 
to easily adapt it for the text from a textbox.

My page contains a dropdown called audienceDrop and the datatable is called 
MSDC_cal_DataTable. I added an event listener to check if the dropdown 
changes. If it does, it creates a new dateview based the results of test: 
function(), which returns the row numbers of whatever the user is 
interested in finding.

The code is:

audienceDrop.addEventListener("change", function() {
if (audienceDrop.value == "All") {
drawTable(MSDC_cal_DataTable);
} else {
searchVal = audienceDrop.value;

var view = new google.visualization.DataView(MSDC_cal_DataTable);
view.setRows(MSDC_cal_DataTable.getFilteredRows([{
column: 1,
test: function(value) {
return (value == null || value == "Everyone" || value.indexOf(searchVal) > 
-1)
}
}]));
drawTable(view);
}
});
}


-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/a29631ef-e76b-447c-add8-5c8bc9c66a05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to