PDA

View Full Version : how to show a columnchart in the Ext.Tooltip?



695w
7 Apr 2010, 11:47 PM
I want to show a columnchart in a tooltip as a Item, when the tooptip show,I can't see the chart,then I Put a columnchart in a Ext.Window ,it works well ,anyone who can tell how to show the chart in a tooltip? is tooltip supports flash? thank you very much!

new Ext.ToolTip({
target : Ext.getBody(), // The overall target element.
delegate : delegate, // Each grid row causes its own
anchor : 'bottom',
defaultAlign : 'l',
anchorToTarget : true,
title : '????',
colseable : true,
anchorOffset : -8,
// width:200,
// height:300,
// seperate show and hide.
// trackMouse : true, // Moving within the row should
// not
// hide the
renderTo : id, // Render immediately so that
autoHide : false,
closable : true,
// tip.body can be
// contentEl : contentEl,
items : [{
xtype : 'panel',
width : 200,
title:'fdaf',
height : 230,
items:[{
xtype : 'columnchart',
store : chartStore,
xtype : 'columnchart',
yField : 'hits',
autoShow : true,
url : 'js/resources/charts.swf',
xField : 'month',
xAxis : new Ext.chart.CategoryAxis({
title : 'Month'
}),
yAxis : new Ext.chart.NumericAxis({
title : 'Hits'
}),
extraStyle : {
xAxis : {
labelRotation : -90
}
}}]

}],
listeners : { // Change content dynamically depending
show : beforeshow,
render : function() {

// chart.show();
}
}
});

Animal
8 Apr 2010, 2:25 AM
Why add an extra Panel?

A ToolTip IS a Panel, as you know!