I have a scatter chart where the dots have a pretty big radius. When I hover over the dot, the tooltip does not show unless I am near the center of the dot. Is there a setting to control when the tooltip is visible?
Printable View
I have a scatter chart where the dots have a pretty big radius. When I hover over the dot, the tooltip does not show unless I am near the center of the dot. Is there a setting to control when the tooltip is visible?
There is 'isItemInPoint' method in 'Ext.chart.series.Scatter'
Inside that method you can find tolerance variable equals 10
So, I guess you need to override that method to increase tolerance
Here is that method
Code:isItemInPoint: function(x, y, item) {
var point,
tolerance = 10,
abs = Math.abs;
function dist(point) {
var dx = abs(point[0] - x),
dy = abs(point[1] - y);
return Math.sqrt(dx * dx + dy * dy);
}
point = item.point;
return (point[0] - tolerance <= x && point[0] + tolerance >= x &&
point[1] - tolerance <= y && point[1] + tolerance >= y);
}
Thanks. I want to use the radius to determine the tolerance. Just by playing wiht numbers, I find that radius * 4 seems to work. Do you know the relationship between radius and point size?
Hi,
It looks that "point" in that method is just a center of scatter item and it doesn't depend on radius. Maybe, it should depend, we are not sure.