[CLOSED] Scatter chart radius + tooltip

  1. #1

    [CLOSED] Scatter chart radius + tooltip

    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?
    Last edited by Daniil; May 13, 2014 at 4:13 PM. Reason: [CLOSED]
  2. #2
    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
    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);
        }
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    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?
  4. #4
    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.

Similar Threads

  1. Adding tooltip to pie chart.
    By KnowledgeSeeker in forum 2.x Help
    Replies: 6
    Last Post: Nov 07, 2013, 6:05 AM
  2. [CLOSED] [#228] Scatter series label - fit into chart
    By bayoglu in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: May 31, 2013, 2:26 AM
  3. [CLOSED] Chart marker radius for tip
    By bayoglu in forum 2.x Legacy Premium Help
    Replies: 9
    Last Post: Apr 19, 2013, 3:54 PM
  4. [CLOSED] [#44] Bug in tooltip in chart or not?
    By feanor91 in forum 2.x Legacy Premium Help
    Replies: 10
    Last Post: Apr 19, 2013, 2:55 PM
  5. Replies: 2
    Last Post: Aug 13, 2012, 2:12 PM

Posting Permissions