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

Sign up
Appearance settings

Commit 2df5be4

Browse files
committed
legend.x behaves differently since plotly.js 2.23.0
1 parent cd89e81 commit 2df5be4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/lib/__tests__/connectLayoutToPlot-test.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,19 @@ Layouts.forEach((Layout) => {
5353
it(`automatically computes min and max defaults`, () => {
5454
const onUpdate = jest.fn();
5555
const wrapper = mount(
56-
<Editor onUpdate={onUpdate} {...fixtures.scatter({layout: {showlegend: true}})}>
56+
<Editor onUpdate={onUpdate} {...fixtures.scatter()}>
5757
<PlotlyPanel>
5858
<Layout>
59-
<Numeric label="Position x" step={0.01} attr="legend.x" />
59+
<Numeric label="Position x" step={0.01} attr="title.x" />
6060
</Layout>
6161
</PlotlyPanel>
6262
</Editor>
6363
)
64-
.find('[attr="legend.x"]')
64+
.find('[attr="title.x"]')
6565
.find(NumericInput);
6666

67-
const expectedMin = -2;
68-
const expectedMax = 3;
67+
const expectedMin = 0;
68+
const expectedMax = 1;
6969
expect(wrapper.prop('min')).toBe(expectedMin);
7070
expect(wrapper.prop('max')).toBe(expectedMax);
7171
});

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /