Hi Everyone!
I’ve got an urgent geochart visualization problem. I want to
visualizing an international researchdata. I can’t programming, but I
made this work so long, but now i can’t move on. My work based on site
instructions and samples, so it’s a patchwork-script, not a
masterpiece.

I’ve 3 Picker, but i want to insert a slider to the „Score”-column. I
typed the slider script, when i’m write the slider code to the
dashboard.bind([NorsouPicker, ClasterPicker, CountryPicker, slider2],
[table, geoChart]).  it isn’t work and i became this errormessage:
One or more participants failed to draw()

But when i’m erased the slider code, the normal dashboard without the
slider is works.

How can i the slider insert, build in this dashboard? What is the
problem with this slider? And how can my dashboard publishing by link?
Thank you in anticipation!
(Sorry for my English)

<!--
You are free to copy and use this sample in accordance with the terms
of the
Apache license (http://www.apache.org/licenses/LICENSE-2.0.html)
-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/
>
    <title>
      Google Visualization API Sample
    </title>
    <script type="text/javascript" src="http://www.google.com/jsapi";></
script>
    <script type="text/javascript">
      google.load('visualization', '1.1', {packages: ['controls']});
    </script>
    <script type="text/javascript">
      function drawVisualization() {
           // Prepare the data
           var data = google.visualization.arrayToDataTable([
               ['Norsou','Country', 'Score', 'Claster'],
               ['S','Australia', 1.96,   'Angol-szasz'],
               ['N','Canada', 2.12, 'Angol-szasz' ],
               ['N','Ireland', 2.44, 'Angol-szasz' ],
               ['N','United Kingdom', 2.35, 'Angol-szasz' ],
               ['S','New Zeland', 1.36,   'Angol-szasz' ],
           ]);

           // Define category pickers for 'Country'
           var NorsouPicker = new
google.visualization.ControlWrapper({
               controlType: 'CategoryFilter',
               containerId: 'control1',
               options: {
                   filterColumnLabel: 'Norsou',
                   ui: {
                       labelStacking: 'vertical',
                       allowTyping: false,
                       allowMultiple: true,
                       caption: 'North-South',
                       label: ''
                   }
               }
           });

            var ClasterPicker = new
google.visualization.ControlWrapper({
               controlType: 'CategoryFilter',
               containerId: 'control2',
               options: {
                   filterColumnLabel: 'Claster',
                   ui: {
                       labelStacking: 'vertical',
                       allowTyping: false,
                       allowMultiple: true,
                       caption: 'Klaszter',
                       label: ''
                   }
               }
           });

       var CountryPicker = new google.visualization.ControlWrapper({
               controlType: 'CategoryFilter',
               containerId: 'control3',
               options: {
                   filterColumnLabel: 'Country',
                   ui: {
                       labelStacking: 'vertical',
                       allowTyping: false,
                       allowMultiple: true,
                       caption: 'Country',
                       label: ''
                   }
               }
           });

        var slider2 = new google.visualization.ControlWrapper({
          'controlType': 'NumberRangeFilter',
          'containerId': 'control4',
          'options': {
            'filterColumnLabel': 'Score',

          }
        });

           //Define a chart to show AML CFT Risk per country
           var geoChart = new google.visualization.ChartWrapper({
               chartType: 'GeoChart',
               containerId: 'chart1',
               // changed "ID" to "Id"
               options: {
                   title: 'Score',
                   displayMode: 'regions',
                   width: 1000,
                   datalessRegionColor: 'C0C0C0',
                   colorAxis: {
                       values: [-3.5, -3, -2, -1, 0, 1, 2, 3],
                       colors: ['#3366FF','#33CCCC',
'#00FFFF','#CCFFFF','#FFFF99','#FFCC00','#FF9900','#FF0000',],
                       minValue: -3.5,
                       maxValue: 3.5,
                   }
               },
               view: { // Defines data to show in geoChart
                   columns: [1, 2]
               }
           });
      // Define a table
        var table = new google.visualization.ChartWrapper({
          'chartType': 'Table',
          'containerId': 'chart2',
          'options': {
            'width': '300px'
          }
        });

           // Create the dashboard.
           var dashboard = new
google.visualization.Dashboard(document.getElementById('dashboard'));

           dashboard.bind([NorsouPicker, ClasterPicker, CountryPicker,
slider2],[table, geoChart]). // consolidated all of the bind calls
           // Draw the dashboard
           draw(data);
       }



      google.setOnLoadCallback(drawVisualization);
    </script>
  </head>
  <body style="font-family: Arial;border: 0 none;">
    <div id="dashboard">
      <table>
        <tr style='vertical-align: top'>
          <td style='width: 300px; font-size: 0.9em;'>
            <div id="control1"></div>
            <div id="control2"></div>
            <div id="control3"></div>
          </td>
          <td style='width: 600px'>
            <div style="float: left;" id="chart1"></div>
            <div style="float: left;" id="chart2"></div>
            <div style="float: left;" id="chart3"></div>
          </td>
        </tr>
      </table>
    </div>
  </body>
</html>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to