Skip to content

restyle/relayout refactor #1999

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 43 commits into from
Sep 20, 2017
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
4d3e2ec
test - and fix - most of the relayout doextras
alexcjohnson Aug 18, 2017
95d7d71
test - and fix - most of the doextra calls in restyle
alexcjohnson Aug 29, 2017
3326ecc
test that xaxis-only items are only in the xaxis in the schema
alexcjohnson Aug 30, 2017
a948cce
merge component attribute schemas into core at register time
alexcjohnson Aug 30, 2017
dd52922
fix lib test for undefined -> null in undoqueue
alexcjohnson Sep 1, 2017
f90f079
abstract id/name counter regex and standardize cartesian attrRegex
alexcjohnson Sep 1, 2017
e036fea
fix #1325 - animating multiple axes
alexcjohnson Sep 1, 2017
69e0188
Plotschema getTraceValObject and getLayoutValObject methods
alexcjohnson Sep 1, 2017
bbfe399
relativeAttr
alexcjohnson Sep 12, 2017
29931ec
fix annotation comments/descriptions
alexcjohnson Sep 12, 2017
fad72a2
make common hover label pick up changes quicker
alexcjohnson Sep 13, 2017
e895b32
edit_types.overrideAll
alexcjohnson Sep 13, 2017
7a7dc6d
let PlotSchema.crawl report the complete attribute string
alexcjohnson Sep 13, 2017
c87b01a
better reporting from hover label test
alexcjohnson Sep 13, 2017
658e5cb
fix registry for new circular dep
alexcjohnson Sep 13, 2017
f49ae5e
massive commit to lock in editType and impliedEdits and clean up rest…
alexcjohnson Sep 13, 2017
7ea0d25
lint
alexcjohnson Sep 13, 2017
284c87f
remove obsolete comment in gl3d
alexcjohnson Sep 14, 2017
b9826c8
change overrideAll API to nested/from-root only
alexcjohnson Sep 14, 2017
7c38a4a
clean up restyle/relayout flag names
alexcjohnson Sep 14, 2017
96cc57f
clean up editTypes/impliedEdits and formalize & document their schema…
alexcjohnson Sep 14, 2017
cb94e95
test restrictions on component xaxis/yaxis schemas
alexcjohnson Sep 15, 2017
238e248
preserve impliedEdits: {key: undefined} by extendDeepAll
alexcjohnson Sep 15, 2017
42662ba
comments on relative_attr regexps
alexcjohnson Sep 15, 2017
50aa1ca
include schema in dist
alexcjohnson Sep 15, 2017
62a1392
fix plotschema test for metaKeys
alexcjohnson Sep 15, 2017
87b26d5
test order-independence of trace/transform/component registration
alexcjohnson Sep 18, 2017
040ed1b
test colorbar editing
alexcjohnson Sep 19, 2017
388a7fe
abstract - and fix - automatic axis type clearing
alexcjohnson Sep 19, 2017
6e8a68c
coerceTraceIndices earlier so clearAxisTypes can use it
alexcjohnson Sep 19, 2017
4f8fc66
move clearAxisTypes into helpers
alexcjohnson Sep 19, 2017
97ddf48
update jsdom to v11.2 with new API
alexcjohnson Sep 19, 2017
fe7db79
oops didn't mean to commit that commented out...
alexcjohnson Sep 19, 2017
68f5dbc
fix and test errorbar visibility toggling
alexcjohnson Sep 19, 2017
d15e541
layout.showlegend test
alexcjohnson Sep 19, 2017
7ec1634
closes #615 - something else in this PR fixed it, just nailing a test
alexcjohnson Sep 19, 2017
a107466
fix #358 - restyling orientation
alexcjohnson Sep 20, 2017
42805c2
test histogram changing data type
alexcjohnson Sep 20, 2017
8d9feaf
fix #2020 - editing plots with multiple histograms
alexcjohnson Sep 20, 2017
0a98a6d
lint
alexcjohnson Sep 20, 2017
e4227aa
move checkTicks into custom_assertions
alexcjohnson Sep 20, 2017
0729921
load custom_matchers globally, and refactor negateIf as a method
alexcjohnson Sep 20, 2017
407ae5a
pull custom_matchers out of requirejs bundle test
alexcjohnson Sep 20, 2017
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
17 changes: 17 additions & 0 deletions test/jasmine/tests/histogram_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,10 @@ describe('Test histogram', function() {
describe('plot / restyle', function() {
var gd;

beforeAll(function() {
jasmine.addMatchers(customMatchers);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(note-to-self comment) I'm getting tired of these jasmine.addMatchers. I'll try to find a way to add our custom matchers globally once and for all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ 🎉 🥇 👏 💯

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global addMatchers, and turning negateIf into a method (which I could only see how to do globally) ->0729921 hopefully it works right on circle 🙏

});

beforeEach(function() {
gd = createGraphDiv();
});
Expand Down Expand Up @@ -513,5 +517,18 @@ describe('Test histogram', function() {
expect(gd._fullData[0].xbins).toEqual({start: 1, end: 6, size: 1});
expect(gd._fullData[0].autobinx).toBe(false);
});

it('allows changing axis type with new x data', function() {
var x1 = [1, 1, 1, 1, 2, 2, 2, 3, 3, 4];
var x2 = ['2017-01-01', '2017-01-01', '2017-01-01', '2017-01-02', '2017-01-02', '2017-01-03'];

Plotly.newPlot(gd, [{x: x1, type: 'histogram'}]);
expect(gd._fullLayout.xaxis.type).toBe('linear');
expect(gd._fullLayout.xaxis.range).toBeCloseToArray([0.5, 4.5], 3);

Plotly.restyle(gd, {x: [x2]});
expect(gd._fullLayout.xaxis.type).toBe('date');
expect(gd._fullLayout.xaxis.range).toEqual(['2016-12-31 12:00', '2017-01-03 12:00']);
});
});
});