Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lukwallace opened this issue Apr 10, 2019 · 0 comments
Open

Comments

@lukwallace
Copy link
Contributor

lukwallace commented Apr 10, 2019

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;
            }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant