CommentAttribute: Object;
The CommentAttribute property determines attribute used as a tooltip for table cells.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), and also add the following code in the handler, that processes document opening event:
var commentAttributeButton = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Set Tooltip", //Text Click: PP.Delegate(onClick) }); function onClick() { //Create an object that contains information about tooltip type: //7 - Value; //5 - Date; //8 - Note. var commentAttribute = {k:5}; wbk.setCommentAttribute(commentAttribute); tsService.editAllSeries(wbk, {its: { it: [] },commentAttribute : wbk.getCommentAttribute()}, onRowsEdited); function onRowsEdited(){ //Refresh the workbookBox component workbookBox.refreshAll(); } }
After executing the example a button named Set Tooltip is placed in the HTML page. Click this button, after that on hovering over a table cell marked with a red triangle a tooltip pops up, showing information about the date:
See also: