8000 Fixup sankey text and shadow by archmoj · Pull Request #5531 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Fixup sankey text and shadow #5531

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

Merged
merged 11 commits into from
Mar 5, 2021
Prev Previous commit
Next Next commit
adjust positions in sankey hover tests
  • Loading branch information
archmoj committed Mar 4, 2021
commit 8ffbbcae62c2dd7e490d54281798eb7b440273bf
22 changes: 11 additions & 11 deletions test/jasmine/tests/sankey_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,15 +669,15 @@ describe('sankey tests', function() {
Lib.clearThrottle();
}

var node = [404, 302];
var node = [410, 300];
var link = [450, 300];

it('should show the correct hover labels', function(done) {
var gd = createGraphDiv();
var mockCopy = Lib.extendDeep({}, mock);

Plotly.newPlot(gd, mockCopy).then(function() {
_hover(404, 302);
_hover(410, 300);

assertLabel(
['Solid', 'incoming flow count: 4', 'outgoing flow count: 3', '447TWh'],
Expand All @@ -697,7 +697,7 @@ describe('sankey tests', function() {
return Plotly.relayout(gd, 'hoverlabel.font.family', 'Roboto');
})
.then(function() {
_hover(404, 302);
_hover(410, 300);

assertLabel(
['Solid', 'incoming flow count: 4', 'outgoing flow count: 3', '447TWh'],
Expand All @@ -722,7 +722,7 @@ describe('sankey tests', function() {
});
})
.then(function() {
_hover(404, 302);
_hover(410, 300);

assertLabel(
['Solid', 'incoming flow count: 4', 'outgoing flow count: 3', '447TWh'],
Expand Down Expand Up @@ -753,7 +753,7 @@ describe('sankey tests', function() {
});
})
.then(function() {
_hover(404, 302);
_hover(410, 300);

assertLabel(
['Solid', 'incoming flow count: 4', 'outgoing flow count: 3', '447TWh'],
Expand Down Expand Up @@ -815,7 +815,7 @@ describe('sankey tests', function() {
mockCopy.data[0].link.customdata[61] = ['linkCustomdata0', 'linkCustomdata1'];

Plotly.newPlot(gd, mockCopy).then(function() {
_hover(404, 302);
_hover(410, 300);

assertLabel(
['Solid', 'incoming flow count: 4', 'outgoing flow count: 3', '447TWh'],
Expand All @@ -838,7 +838,7 @@ describe('sankey tests', function() {
});
})
.then(function() {
_hover(404, 302);
_hover(410, 300);

assertLabel(
[ 'hovertemplate', '447TWh', '447.48', 'nodeCustomdata0/nodeCustomdata1', 'trace 0'],
Expand Down Expand Up @@ -890,7 +890,7 @@ describe('sankey tests', function() {

Plotly.newPlot(gd, mockCopy)
.then(function() {
_hover(404, 302);
_hover(410, 300);

assertLabel(
['Solid', 'incoming flow count: 4', 'outgoing flow count: 3', '447TWh'],
Expand Down Expand Up @@ -1054,7 +1054,7 @@ describe('sankey tests', function() {
var mockCopy = Lib.extendDeep({}, mock);

Plotly.newPlot(gd, mockCopy)
.then(function() { _hover(404, 302); })
.then(function() { _hover(410, 300); })
.then(function() {
assertHoverLabelContent({
nums: 'Solid\nincoming flow count: 4\noutgoing flow count: 3',
Expand All @@ -1064,7 +1064,7 @@ describe('sankey tests', function() {
.then(function() {
return Plotly.restyle(gd, 'hoverlabel.namelength', 3);
})
.then(function() { _hover(404, 302); })
.then(function() { _hover(410, 300); })
.then(function() {
assertHoverLabelContent({
nums: 'Solid\nincoming flow count: 4\noutgoing flow count: 3',
Expand All @@ -1086,7 +1086,7 @@ describe('sankey tests', function() {

function _makeWrapper(eventType, mouseFn) {
var posByElementType = {
node: [404, 302],
node: [410, 300],
link: [450, 300]
};

Expand Down
0