-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
94 additions
and
25 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.4 KB
__tests__/integration/snapshots/static/alphabetIntervalAxisArrowPosition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13 KB
__tests__/integration/snapshots/static/alphabetIntervalAxisArrowTransposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
__tests__/plots/static/alphabet-interval-axis-arrow-position.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { G2Spec } from '../../../src'; | ||
|
||
export function alphabetIntervalAxisArrowPosition(): G2Spec { | ||
return { | ||
type: 'interval', | ||
transform: [{ type: 'sortX', by: 'y', reverse: true }], | ||
data: { | ||
type: 'fetch', | ||
value: 'data/alphabet.csv', | ||
}, | ||
axis: { | ||
x: { line: true, arrow: true, position: 'top' }, | ||
y: { labelFormatter: '.0%', line: true, arrow: true, position: 'right' }, | ||
}, | ||
encode: { | ||
x: 'letter', | ||
y: 'frequency', | ||
color: 'steelblue', | ||
}, | ||
}; | ||
} |
21 changes: 21 additions & 0 deletions
21
__tests__/plots/static/alphabet-interval-axis-arrow-transposed.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { G2Spec } from '../../../src'; | ||
|
||
export function alphabetIntervalAxisArrowTransposed(): G2Spec { | ||
return { | ||
type: 'interval', | ||
coordinate: { transform: [{ type: 'transpose' }] }, | ||
data: { | ||
type: 'fetch', | ||
value: 'data/alphabet.csv', | ||
}, | ||
axis: { | ||
x: { line: true, arrow: true }, | ||
y: { labelFormatter: '.0%', line: true, arrow: true }, | ||
}, | ||
encode: { | ||
x: 'letter', | ||
y: 'frequency', | ||
color: 'steelblue', | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { G2Spec } from '../../../src'; | ||
|
||
export function alphabetIntervalAxisArrow(): G2Spec { | ||
return { | ||
type: 'interval', | ||
data: { | ||
type: 'fetch', | ||
value: 'data/alphabet.csv', | ||
}, | ||
axis: { | ||
x: { line: true, arrow: true }, | ||
y: { labelFormatter: '.0%', line: true, arrow: true }, | ||
}, | ||
encode: { | ||
x: 'letter', | ||
y: 'frequency', | ||
color: 'steelblue', | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters