PDA

View Full Version : [FIXED] ExtJS 6.0.0 Documentation bug - Ext.chart.series.Series.tooltip



twasink
20 Jul 2015, 9:19 PM
The example for the Ext.chart.series.Series tooltip config property is incorrect. It specifies a 'renderer' function used to render the tooltip:



tooltip:{
trackMouse:true,
width:140,
height:28,
renderer:function(storeItem, item){
this.setHtml(storeItem.get('name')+': '+ storeItem.get('data1')+' views');
}
}

This is incorrect. The renderer function - which is not part of the Ext.tip.ToolTip's properties - is called with the arguments of the tooltip, then the storeItem, and the item. It's also called in the context of the 'scope' property defined on the tooltip object (again, not one of the Ext.tip.ToolTip's properties).

A more accurate example would be:


tooltip:{
trackMouse:true,
width:140,
height:28,
scope: this,
renderer:function(toolTip, storeItem, item){
toolTip.setHtml(storeItem.get('name')+': '+ storeItem.get('data1')+' views');
}
}

greg.barry
27 Jul 2015, 12:17 PM
Thanks for the report! I have opened a bug in our bug tracker.