-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fixes global chart title selection #6654
Conversation
@stormpython these look like legit test failures. |
So it seems. I will fix them. |
@rashidkpc Tests are fixed. |
@@ -12,10 +14,10 @@ define(function () { | |||
return function (selection) { | |||
selection.each(function (data) { | |||
var div = d3.select(this); | |||
var parent = d3.select($(this).parents('.vis-wrapper')[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be wrapped in d3.select? can we use only jquery, or d3 instead?
Small comment above, fix works for me. Is there a better location we can manage which title to show ? Using a parent selector is giving me the feeling that this module is reaching outside its scope. |
@jbudz while I agree, this isn't a very pretty solution, just using jquery or only d3 looks much worse and more verbose. In addition, while I also agree reaching out of scope is generally a bad idea, due to the way the vislib currently works, to make that fix here would require a bigger change than what I've submitted. Given that the vislib will change in the future and these types of problems shouldn't happen with the new library, I'd rather not tinker with the fragile state of the current library. |
@jbudz ok, I found a less verbose way to do it with jquery. Making those changes. |
ok @jbudz, back to you. |
LGTM |
@rashidkpc @spalger and @jbudz both gave it a LGTM. Is it ok to merge in master? |
@stormpython merge it |
@stormpython also, please tag this with the versions it affects |
--------- **Commit 1:** Troubleshooting * Original sha: 81a9f29 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-22T21:44:17Z **Commit 2:** Merge branch 'master' into issue/6556 * Original sha: f628114 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-24T16:48:41Z **Commit 3:** troubleshooting * Original sha: 152f2b6 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-24T17:13:01Z **Commit 4:** Closes #6556. Fixes issue with global x and y axis selection. * Original sha: 2ffbb76 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-24T22:44:54Z **Commit 5:** Merge branch 'master' into issue/6556 * Original sha: da025aa * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-24T22:45:12Z **Commit 6:** Merge branch 'master' into issue/6556 * Original sha: cf4a152 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-24T22:45:50Z **Commit 7:** fixing tests * Original sha: b2f26e7 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-25T16:55:30Z **Commit 8:** Merge branch 'master' into issue/6556 * Original sha: a56c5d5 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-25T17:51:21Z **Commit 9:** refactoring * Original sha: b42f5bf * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-25T21:43:59Z **Commit 10:** Merge branch 'master' into issue/6556 * Original sha: 7f96a11 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-28T22:59:03Z
--------- **Commit 1:** Troubleshooting * Original sha: 81a9f29 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-22T21:44:17Z **Commit 2:** Merge branch 'master' into issue/6556 * Original sha: f628114 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-24T16:48:41Z **Commit 3:** troubleshooting * Original sha: 152f2b6 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-24T17:13:01Z **Commit 4:** Closes #6556. Fixes issue with global x and y axis selection. * Original sha: 2ffbb76 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-24T22:44:54Z **Commit 5:** Merge branch 'master' into issue/6556 * Original sha: da025aa * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-24T22:45:12Z **Commit 6:** Merge branch 'master' into issue/6556 * Original sha: cf4a152 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-24T22:45:50Z **Commit 7:** fixing tests * Original sha: b2f26e7 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-25T16:55:30Z **Commit 8:** Merge branch 'master' into issue/6556 * Original sha: a56c5d5 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-25T17:51:21Z **Commit 9:** refactoring * Original sha: b42f5bf * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-25T21:43:59Z **Commit 10:** Merge branch 'master' into issue/6556 * Original sha: 7f96a11 * Authored by Shelby Sturgis <shelbyjsturgis@gmail.com> on 2016-03-28T22:59:03Z
Closes #6556.
It fixes the issue where chart titles on the dashboard change based on the resizing of other charts on the dashboard. This is the result of a global selection of all x and y axis containing DOM elements.
This pull request fixes the issue by making the selection local and not global.
This pull request will need to be backported.