hi !
how to add a event on my owner visualization ?
I created a visualization in a file myTables.js
var visualisation = {};
visualisation.MyTable = function(container) {
this.containerElement = container;
};
visualisation.MyTable.prototype.draw = function(data, options,
moisActuel) {
......
};
visualisation.MyTable.prototype.escapeHtml = function(text){...};
I want to add here an event 'onclik'
visualisation.MyTable.prototype.onclick = function(rowIndex) {
this.highlightRow(this.selectedRow, false); // Clear previous
selection
this.highlightRow(rowIndex, true); // Highlight new selection
// Save the selected row index in case getSelection is called.
this.selectedRow = rowIndex;
// Fire a select event.
google.visualization.events.trigger(this, 'select', {});
};
And, on my file .html, i call the function but when i click on table,
non event run
var table1 = new
visualisation.MyTable(document.getElementById('table'));
table1.draw(data, {showLineNumber : false});
table1.onclick(table1.getSelection().row);
Can you help me please
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.