Serey,
I'm not sure if you can help at this point but thought it is worth a try. The source works beautiful within the JS Fiddle environment, but when I put it into my source code (Alpha Anywhere development environment), I get an error in IE when I run the code (Firefox does nothing. no error but doesn't recognize the click event on the gauge either):
![]()
My javascript function is EXACTLY as it is in JS Fiddle which I've also copied and pasted here:
google.load('visualization', '1', {packages: ['controls']});
google.setOnLoadCallback(drawTaskChart);
function drawTaskChart() { var chartdata = {dialog.object}._data;
// Prepare the data
var data = google.visualization.arrayToDataTable(
chartdata
);
// set up gauge datatable
var gaugeData = new google.visualization.DataTable();
gaugeData.addColumn('string', 'Project');
gaugeData.addColumn('number', 'Pct');
var gauge1 = new google.visualization.ChartWrapper({
chartType: 'Gauge',
dataTable: gaugeData,
containerId: 'charttasks',
options: {
width: 200,
height: 200,
min: 0,
max: 100,
animation: {
duration: 1000,
easing: 'inAndOut'
},
redFrom: 0,
redTo: 33,
yellowFrom: 33,
yellowTo: 66,
greenFrom: 66,
greenTo: 100,
majorTicks: ['0', '20', '40', '60', '80', '100']
},
view: {
rows: [0] // restrict to the first row only
}
});
// Define category pickers for 'Project'
var ProjectPicker = new google.visualization.ControlWrapper({
controlType: 'CategoryFilter',
containerId: 'Projects',
options: {
filterColumnLabel:'Project',
// filterColumnIndex: 1, // filter on the 2nd column
ui: {
labelStacking: 'vertical',
allowTyping: true,
allowMultiple: false,
caption: 'Pick a Project',
label: 'Select a Project'
}
}
});
var dashboard = new google.visualization.Dashboard(document.getElementById('dashboard'));
dashboard.bind([ProjectPicker], [gauge1]);
dashboard.draw(data);