Skip to content
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

189 ordinal scale domain item ordering #1

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
87ab745
Reifying current default ordering logic with a passing test case and …
monfera Mar 25, 2016
a547482
Ensure that null / undefined removal is in place, even in the presenc…
monfera Mar 25, 2016
69bf832
Ensure that no errors arise from the possibility of broader order spe…
monfera Mar 25, 2016
3fd3cc0
Ensure that it adheres to the categories array even if it doesn't com…
monfera Mar 25, 2016
e2977c5
Adding attribute definitions: categorymode and categories; simplifyin…
monfera Mar 26, 2016
62c4ac5
Renaming of 'categories' to 'categorylist' (it was explicitly deleted…
monfera Mar 27, 2016
85d60d6
Minimal commit to demonstrate the working of categorymode = 'array'
monfera Mar 29, 2016
f6c40b6
Minimal change for implementing 'category ascending' and 'category de…
monfera Mar 31, 2016
e4f2167
factored out orderedCategories into a separate function
monfera Mar 31, 2016
03643fe
factored out orderedCategories into a separate function
monfera Mar 31, 2016
9c366ce
lint orderedCategories
monfera Mar 31, 2016
f626b08
#189 role: info
monfera Apr 7, 2016
2f939af
#189 updating preexisting test cases in line with PR feedback (if the…
monfera Apr 7, 2016
ce35e8b
#189 updating preexisting test cases so that order itself is checked;…
monfera Apr 7, 2016
262c747
#189 updating preexisting test cases: further updates to proper axis …
monfera Apr 7, 2016
5f33a7b
#189 updating preexisting test cases: further updates to proper axis …
monfera Apr 7, 2016
f4214cb
#189 adding a path for when categorymode is not in ['array', 'categor…
monfera Apr 8, 2016
cbc98fd
#189 updating test case with non-utilized categorylist elements at be…
monfera Apr 8, 2016
a806ca2
#189 test case with null value for a category we just want for an axi…
monfera Apr 8, 2016
5ad6b5c
#189 baseline test case based on codepen pointed to by @etpinard
monfera Apr 8, 2016
82076f2
#189 commented out categorymode value ascending/descending as it's no…
monfera Apr 9, 2016
6fb2871
#189 adding test cases for trace lines with mutually exclusive catego…
monfera Apr 9, 2016
616121b
#189 adding test cases for trace lines with partially overlapping, fu…
monfera Apr 9, 2016
89794c6
#189 adding test cases for combinations of category ordering and stac…
monfera Apr 9, 2016
849978e
#189 test case linting
monfera Apr 9, 2016
d6fad10
#189 adding missing docs and reducing assumptions
monfera Apr 9, 2016
7c355b8
#189 adding actual DOM axis tick order tests for a couple of less tri…
monfera Apr 9, 2016
8a2292c
#189 rewriting cateogory sorter to O(1) + one sort call
monfera Apr 9, 2016
9b01bcc
#189 rewriting cateogory sorter: extract out logic
monfera Apr 9, 2016
010451b
#189 rewriting cateogory sorter: switching to switch
monfera Apr 9, 2016
6c9d0b5
#189 rewriting cateogory sorter: misc. improvements
monfera Apr 9, 2016
166aeb4
#189 renaming for uniformity (predominantly createGraphDiv() seems to…
monfera Apr 12, 2016
e472e14
#189 initial round of coercions with test cases
monfera Apr 12, 2016
d16fe6b
#189 additional tests for categorymode coercions
monfera Apr 12, 2016
0314f37
#189 comment fix
monfera Apr 12, 2016
043ac1b
#189 PR feedback and linting
monfera Apr 12, 2016
b98bd65
#189 image based regression test JSONs
monfera Apr 12, 2016
e007f73
#189 reworking the order code because it converted numbers to strings…
monfera Apr 12, 2016
34a5054
#189 adding image based tests
monfera Apr 12, 2016
c6d44d9
#189 comment update
monfera Apr 12, 2016
44a0c3d
#189 switching from O(n) to O(log(N)) complexity unique insertion sort
monfera Apr 12, 2016
613fda3
#189 adding axis attributes to 3D plots
monfera Apr 12, 2016
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
10 changes: 5 additions & 5 deletions test/jasmine/tests/calcdata_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ describe('calculated data and points', function() {
categorymode: 'category ascending'
}});

expect(gd.calcdata[0][0].y).toEqual(11);
expect(gd.calcdata[0][1].y).toEqual(13);
expect(gd.calcdata[0][2].y).toEqual(15);
expect(gd.calcdata[0][3].y).toEqual(14);
expect(gd.calcdata[0][4].y).toEqual(12);
expect(gd.calcdata[0][0]).toEqual(jasmine.objectContaining({x: 2, y: 15}));
expect(gd.calcdata[0][1]).toEqual(jasmine.objectContaining({x: 0, y: 11}));
expect(gd.calcdata[0][2]).toEqual(jasmine.objectContaining({x: 4, y: 12}));
expect(gd.calcdata[0][3]).toEqual(jasmine.objectContaining({x: 1, y: 13}));
expect(gd.calcdata[0][4]).toEqual(jasmine.objectContaining({x: 3, y: 14}));
});
Copy link
Owner Author

Choose a reason for hiding this comment

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

@etpinard Just an FYI, since I started this CR with the test cases, my conception on where order would be present became outdated. As now I understand that gd.calcdata will keep the trace order, I'm updating test cases such that the original trace order is expected, and explicit checks on the x/y tuples are in place. It looks good to me but please tell me if you have an alternative suggestion.

Copy link

Choose a reason for hiding this comment

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

nicely done.


it('should output categories in descending domain alphanumerical order', function() {
Expand Down