Skip to content

Tooltip shows incorrect text on scatter plots with similar points #294

@lukwallace

Description

@lukwallace

Only occurs for charts with points that have the same X and Y values (but differing Z). The tooltip calls a findOriginalDataPoint function which finds the first point that has the matching x and y, and uses that point to generate the tooltip text message; points with the same x and y values but different Z, or other values will not be correctly picked up.

Snippet from contour.js

            function findOriginalDataPoint(d) {
                var res = [];
                _.each(data, function(series, seriesIndex) {
                    var name = series.name;
                    _.each(series.data, function(point) {
                        if (point.x === d.x && d.y === point.y) {
                            res.push(_.extend(point, {
                                series: name,
                                seriesIndex: seriesIndex
                            }));
                        }
                    });
                });
                return res;
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions