Hello,
Thank you so much for your response and suggestion. I manage to get the
error solved from following your suggestion below.
I have added in the 'string filter' control to my dashboard and it does
not seem to be appearing on the client-side. I have debugged the code on
the browser end and it seems to be throwing no errors either. I am not
sure why the stringFilter is not showing on the client-side.
// Define a StringFilter control for the 'Name' column
var stringFilter = new google.visualization.ControlWrapper({
'controlType': 'StringFilter',
'containerId': 'control1',
'options': {
'filterColumnLabel': columnNames.split(',')[0]
}
});
new
google.visualization.Dashboard(document.getElementById('PieChartExample')).bind([categoryPicker],[pie],[stringFilter]).draw(data);
}
</script>
<div id="PieChartExample">
<table>
<tr style='vertical-align: top'>
<td>
<div id="CategoryPickerContainer"></div>
<div id="control1"></div>
<div id="control2"></div>
</td>
</tr>
<tr>
<td >
<div style="float: left;"
id="PieChartContainer"></div>
</td>
</tr>
</table>
</div>
Any help would be much appreciated. Thank you for your time and help.
On Tuesday, February 25, 2014 5:19:31 PM UTC, asgallant wrote:
>
> The problem is here:
>
> 'filterColumnLabel': columnNames.split(',')[2],
>
> Since you are not setting a label for the 3rd column, filterColumnLabel
> gets set to an empty string, which the API does not like. Either set a
> column label for the 3rd column, or use filterColumnIndex instead:
>
> filterColumnIndex: 2,
>
> Incidentally, you will have a problem in IE with the trailing comma in
> your data array:
>
>
> [{"ColumnName":"ADAGI","Value":59,"Type":"CVR"},{"ColumnName":"AXIUS","Value":32,"Type":"CVR"},{"ColumnName":"BACCH","Value":75,"Type":"CVR"}
> ,] <-- this comma
>
> IE with throw a fit to rival a petulant 2-year-old child at the sight of
> such a comma.
>
>>
>>>>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.