I'm building my first dashboard with google scripts, I have absolutely no experience with programming, but have managed to get pretty far. I've created a stringFilter control which is bound to a columnchart. The filter allows users to type in their userID so the chart will show only their data. The trouble is, when the chart is first loaded ALL the data is displayed. I would prefer to have an empty chart to start. To achieve that I set the state value of the filter to 'CFS', which precedes all userIDs. This works great, the chart remains empty until a userID is entered. But, if the person was to clear the string box for whatever reason, the complete dataset would once again graphed.
My question is, does anyone know to prevent that from happening? Below is the code for control.
I can't switch to a categoryFilter because that would display a list of all the userIDs and that is exactly what I'm trying to avoid.
Thanks in advance for any help.
var personPicker = new google.visualization.ControlWrapper({ 'controlType': 'StringFilter', 'containerId': 'personFilter_div', 'options': {'matchType': 'exact', 'filterColumnLabel': 'Name', 'ui': {label: 'ID number:', labelStacking:'vertical', allowNone: false, allowTyping: true, allowMultiple: false}}, 'state': { 'value': 'CFS'}};
Aucun commentaire:
Enregistrer un commentaire