Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Drop support for passing a string to the title attribute, and drop support for deprecated attributes titlefont, titleposition, titleside, and titleoffset #7212

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 13 commits into from
Oct 9, 2024
Prev Previous commit
Next Next commit
update jasmine tests
  • Loading branch information
emilykl committed Oct 7, 2024
commit b4d2befb783eaeb23b81eab311878ac1ad91466c
25 changes: 1 addition & 24 deletions 25 test/jasmine/tests/funnelarea_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ describe('Funnelarea traces', function() {
it('shows title top left', function(done) {
Plotly.newPlot(gd, [{
values: [3, 2, 1],
title: { text: 'Test<BR>Title', position: 'top center', font: { size: 12 } },
title: { text: 'Test<BR>Title', position: 'top left', font: { size: 12 } },
type: 'funnelarea',
textinfo: 'none'
}], {height: 300, width: 300})
Expand Down Expand Up @@ -568,29 +568,6 @@ describe('Funnelarea traces', function() {
.then(done, done.fail);
});

it('should be able to restyle title despite using the deprecated attributes', function(done) {
Plotly.newPlot(gd, [{
type: 'funnelarea',
values: [1, 2, 3],
title: { text: 'yo', position: 'top left', font: { color: 'blue' } },
}])
.then(function() {
_assertTitle('base', 'yo', 'rgb(0, 0, 255)');
_verifyTitle(true, false, true, false, false);

return Plotly.restyle(gd, {
title: { text: 'oy' },
'title.font.color': 'red',
'title.position': 'top right'
});
})
.then(function() {
_assertTitle('base', 'oy', 'rgb(255, 0, 0)');
_verifyTitle(false, true, true, false, false);
})
.then(done, done.fail);
});

it('should be able to react with new text colors', function(done) {
Plotly.newPlot(gd, [{
type: 'funnelarea',
Expand Down
23 changes: 0 additions & 23 deletions 23 test/jasmine/tests/pie_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -786,29 +786,6 @@ describe('Pie traces', function() {
.then(done, done.fail);
});

it('should be able to restyle title despite using the deprecated attributes', function(done) {
Plotly.newPlot(gd, [{
type: 'pie',
values: [1, 2, 3],
title: { text: 'yo', font: { color: 'blue' }, position: 'top left' }
}])
.then(function() {
_assertTitle('base', 'yo', 'rgb(0, 0, 255)');
_verifyTitle(true, false, true, false, false);

return Plotly.restyle(gd, {
title: { text: 'oy' },
'title.font.color': 'red',
'title.position': 'bottom right'
});
})
.then(function() {
_assertTitle('base', 'oy', 'rgb(255, 0, 0)');
_verifyTitle(false, true, false, true, false);
})
.then(done, done.fail);
});

it('should be able to react with new text colors', function(done) {
Plotly.newPlot(gd, [{
type: 'pie',
Expand Down
17 changes: 0 additions & 17 deletions 17 test/jasmine/tests/titles_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,23 +619,6 @@ describe('Titles can be updated', function() {
'xaxis.title.text': NEW_XTITLE,
'yaxis.title.text': NEW_YTITLE
}
},
{
desc: 'despite passing title only as a string (backwards-compatibility)',
update: {
title: NEW_TITLE,
xaxis: {title: NEW_XTITLE},
yaxis: {title: NEW_YTITLE}
}
},
{
desc: 'despite passing title only as a string using string attributes ' +
'(backwards-compatibility)',
update: {
title: NEW_TITLE,
'xaxis.title': NEW_XTITLE,
'yaxis.title': NEW_YTITLE
}
}
].forEach(function(testCase) {
it('via `Plotly.relayout` ' + testCase.desc, function(done) {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.