10000 Fix uniformtext and enable coloraxis for sunburst and treemap as well as pathbar.textfont by archmoj · Pull Request #4444 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Fix uniformtext and enable coloraxis for sunburst and treemap as well as pathbar.textfont #4444

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 16 commits into from
Jan 6, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make new transition tests more robust
  • Loading branch information
archmoj committed Dec 29, 2019
commit 2cf7defe563cbdaac46d880e6e54aa6f21965888
16 changes: 8 additions & 8 deletions test/jasmine/tests/sunburst_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2123,11 +2123,11 @@ describe('sunburst uniformtext', function() {
'Oscar',
'Papa',
'Quebec',
'Romeo',
'Romeo and Juliet',
'Sierra',
'Tango',
'Uniform',
'Victor',
'ViKtor Korchnoi - Anatoly Karpov',
'Whiskey',
'X ray',
'Yankee',
Expand All @@ -2136,29 +2136,29 @@ describe('sunburst uniformtext', function() {
textinfo: 'label'
}],
layout: {
width: 320,
height: 320,
width: 500,
height: 500,
uniformtext: {
mode: 'hide',
minsize: 10
minsize: 12
}
}
})
.then(assertTextSizes('before click', {
fontsizes: [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12],
scales: [0.86, 0.86, 0, 0, 0, 0, 0, 0.86, 0, 0.86, 0.86, 0.86],
scales: [1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1],
}))
.then(click(gd, 2)) // click on Uniform
.then(delay(constants.CLICK_TRANSITION_TIME + 1))
.then(assertTextSizes('after click child', {
fontsizes: [12, 12, 12, 12, 12, 12],
scales: [1, 1, 1, 1, 1, 1],
scales: [1, 0, 1, 1, 1, 1],
}))
.then(click(gd, 1)) // click on Oscar
.then(delay(constants.CLICK_TRANSITION_TIME + 1))
.then(assertTextSizes('after click parent', {
fontsizes: [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12],
scales: [0.86, 0.86, 0, 0, 0, 0, 0, 0.86, 0, 0.86, 0.86, 0.86],
scales: [1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1],
}))
.catch(failTest)
.then(done);
Expand Down
18 changes: 10 additions & 8 deletions test/jasmine/tests/treemap_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1812,6 +1812,8 @@ describe('treemap uniformtext', function() {
Plotly.plot(gd, {
data: [{
type: 'treemap',
tiling: { packing: 'dice'},
pathbar: { visible: false },
parents: [
'',
'Oscar',
Expand All @@ -1831,11 +1833,11 @@ describe('treemap uniformtext', function() {
'Oscar',
'Papa',
'Quebec',
'Romeo',
'Romeo and Juliet',
'Sierra',
'Tango',
'Uniform',
'Victor',
'ViKtor Korchnoi - Anatoly Karpov',
'Whiskey',
'X ray',
'Yankee',
Expand All @@ -1844,29 +1846,29 @@ describe('treemap uniformtext', function() {
textinfo: 'label'
}],
layout: {
width: 350,
width: 850,
height: 350,
uniformtext: {
mode: 'hide',
minsize: 10
minsize: 12
}
}
})
.then(assertTextSizes('before click', {
fontsizes: [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12],
scales: [0.84, 0.84, 0.84, 0, 0.84, 0.84, 0, 0.84, 0, 0.84, 0.84, 0],
scales: [1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1],
}))
.then(click(gd, 2)) // click on Uniform
.then(delay(constants.CLICK_TRANSITION_TIME + 1))
.then(assertTextSizes('after click child', {
fontsizes: [12, 12, 12, 12, 12, 12, 12],
scales: [0.86, 0.86, 0.86, 0.86, 0.86, 0.86, 0.86],
fontsizes: [12, 12, 12, 12, 12, 12],
scales: [1, 0, 1, 1, 1, 1],
}))
.then(click(gd, 1)) // click on Oscar
.then(delay(constants.CLICK_TRANSITION_TIME + 1))
.then(assertTextSizes('after click parent', {
fontsizes: [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12],
scales: [0.84, 0.84, 0.84, 0, 0.84, 0.84, 0, 0.84, 0, 0.84, 0.84, 0],
scales: [1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1],
}))
.catch(failTest)
.then(done);
Expand Down
0