Skip to content

Commit

Permalink
Revert "fix(vega#6708): change domain order for union with (vega#8451)"
Browse files Browse the repository at this point in the history
This reverts commit d4591fb.
  • Loading branch information
kanitw committed Oct 10, 2022
1 parent d4591fb commit efc42b5
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 140 deletions.
Binary file removed examples/compiled/arc_color_mappings.png
Binary file not shown.
1 change: 0 additions & 1 deletion examples/compiled/arc_color_mappings.svg

This file was deleted.

77 changes: 0 additions & 77 deletions examples/compiled/arc_color_mappings.vg.json

This file was deleted.

60 changes: 0 additions & 60 deletions examples/specs/arc_color_mappings.vl.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/compile/scale/domain.ts
Expand Up @@ -251,7 +251,7 @@ function parseSingleChannelDomain(

const unionWith = convertDomainIfItIsDateTime(domain.unionWith, type, timeUnit);

return makeExplicit([...unionWith, ...defaultDomain.value]);
return makeExplicit([...defaultDomain.value, ...unionWith]);
} else if (isSignalRef(domain)) {
return makeExplicit([domain]);
} else if (domain && domain !== 'unaggregated' && !isParameterDomain(domain)) {
Expand Down
2 changes: 1 addition & 1 deletion test/compile/scale/domain.test.ts
Expand Up @@ -50,7 +50,7 @@ describe('compile/scale', () => {
});

const xDomain = testParseDomainForChannel(model, 'x');
expect(xDomain).toEqual([[0, 100], {data: 'main', field: 'a'}]);
expect(xDomain).toEqual([{data: 'main', field: 'a'}, [0, 100]]);
});

it('correctly parse signal domain', () => {
Expand Down

0 comments on commit efc42b5

Please sign in to comment.