I've solved tooltips auto width problem on charts with this code:
Code:
var myTips = { trackMouse: true, //width: auto, //this doesn't work
height: 20,
titleAlign: 'left',
showDelay: 0,
layout: 'fit',
dismissDelay: 0,
hideDelay: 0,
renderer: function(storeItem, item) {
this.setTitle(storeItem.get( 'my_text_field' ));
},
listeners: {
beforeshow: {
fn: function (tip) {
var widthTip = tip.title;
//6.2 = aprox width of one character
widthTip = (widthTip.length*6.2);
return tip.width = widthTip;;
}
}
}
};
chart.series.add({
type: 'line',
axis: 'left',
xField: xField,
yField: yField,
title: 'my title',
tips: myTips
});
Hope this helps someone.