Skip to content

Commit 1c40947

Browse files
committed
try ax autorange as 'axrange' edit type
1 parent 138a84f commit 1c40947

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/plot_api/plot_api.js

+1
Original file line numberDiff line numberDiff line change
@@ -1708,6 +1708,7 @@ function addAxRangeSequence(seq, rangesAltered) {
17081708
subroutines.doTicksRelayout;
17091709

17101710
seq.push(
1711+
subroutines.doAutoRangeAndConstraints,
17111712
doTicks,
17121713
subroutines.drawData,
17131714
subroutines.finalDraw

src/plots/cartesian/layout_attributes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module.exports = {
7878
values: [true, false, 'reversed'],
7979
dflt: true,
8080
role: 'info',
81-
editType: 'plot',
81+
editType: 'axrange',
8282
impliedEdits: {'range[0]': undefined, 'range[1]': undefined},
8383
description: [
8484
'Determines whether or not the range of this axis is',

test/jasmine/tests/plot_api_test.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ describe('Test plot api', function() {
634634
});
635635

636636
it('should trigger minimal sequence for cartesian axis range updates', function() {
637-
var seq = ['doTicksRelayout', 'drawData', 'finalDraw'];
637+
var seq = ['doAutoRangeAndConstraints', 'doTicksRelayout', 'drawData', 'finalDraw'];
638638

639639
function _assert(msg) {
640640
expect(gd.calcdata).toBeDefined();
@@ -650,7 +650,10 @@ describe('Test plot api', function() {
650650
['relayout', ['xaxis.range[0]', 0]],
651651
['relayout', ['xaxis.range[1]', 3]],
652652
['relayout', ['xaxis.range', [-1, 5]]],
653-
['update', [{}, {'xaxis.range': [-1, 10]}]]
653+
['update', [{}, {'xaxis.range': [-1, 10]}]],
654+
655+
['relayout', ['xaxis.autorange', true]],
656+
['update', [{}, {'xaxis.autorange': true}]]
654657
];
655658

656659
specs.forEach(function(s) {

test/jasmine/tests/scatter_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ describe('end-to-end scatter tests', function() {
891891
expect(schema.traces.scatter.attributes.marker.size.editType)
892892
.toBe('calc', 'marker.size editType');
893893
expect(schema.layout.layoutAttributes.xaxis.autorange.editType)
894-
.toBe('plot', 'ax autorange editType');
894+
.toBe('axrange', 'ax autorange editType');
895895

896896
Plotly.plot(gd, [{ y: [1, 2, 1] }])
897897
.then(function() {

0 commit comments

Comments
 (0)