I'm able to pass a JSON string from the servlet and populate a DataTable 
with no problems.  When I create a dashboard and controls, I get the 
following errors:
One or more participants failed to draw()×
The control type is not defined.

I'm unable to find the error.  Requesting any assistance.  Thank you  RI

Code:
<script type="text/javascript" >
                        //Load the Visualization API and the table package
                        //google.load('visualization', '1', {packages: 
['table']});
                        google.load('visualization', '1.1', {packages: 
['controls']});

                        //Initialize global variable
                        var lucene_data = "";


                        function results() {

                            var val = $("#text_search_box").val();

                            $("#results_div").css('display', 'block');

                            $("#div_rt_functions").css('display', 'block');
                            $("#div_rt_functions").addClass('prefix10');


                            $.post("Search",
                                    {
                                        txt_search: val
                                    },
                            function(data, status) {

                                lucene_data = data;
                                google.setOnLoadCallback(drawTable());

                            });

                        }

                        function drawTable() {

                            //Instantiate and draw our chart, passing in 
some options
                            var data_json = jQuery.parseJSON(lucene_data);

                            //Prepare Data
                            var data = new 
google.visualization.DataTable(data_json, 0.6);
                            //Options for the table
                            var options = {'height': 500, 'width': 650};
                            
                            //Create a standard table
                            //var table = new 
google.visualization.Table(document.getElementById('results_div'));

                            //Define string filter for Name field
                            var control = new 
google.visualization.ControlWrapper({
                                'chartType': 'NumberRangeFilter',
                                'containerId': 'div_table_controls',
                                'options': {
                                    'filterColumnLabel': 'TotalAmount'
                                }
                            });

                            //Define table
                            var table = new 
google.visualization.ChartWrapper({
                                'chartType': 'Table',
                                'containerId': 'results_div'
                                options: options
                            });
                            
                            var dashboard = new 
google.visualization.Dashboard(document.getElementById('div_dash'));

                            dashboard.bind(control, table);
                            dashboard.draw(data_json);


                            //Draw Standard Table
                            //table.draw(dataresults, options);

                        }

</script>

-- 
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.

Reply via email to