-
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.
Browse files
Browse the repository at this point in the history
* fix(interval): fix interval render funnel (#4868) * fix(interval): fix funnel and pyramid props * fix(interval): update funnel snapshot --------- Co-authored-by: shield2018 <>
- Loading branch information
1 parent
2add11b
commit 1e328b7
Showing
7 changed files
with
101 additions
and
14 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,38 @@ | ||
import { G2Spec } from '../../../src'; | ||
|
||
export function alphabetIntervalFunnel(): G2Spec { | ||
return { | ||
type: 'interval', | ||
coordinate: { | ||
transform: [{ type: 'transpose' }], | ||
}, | ||
data: [ | ||
{ text: '页面', value: 1000 }, | ||
{ text: '页面1', value: 900 }, | ||
{ text: '页面2', value: 800 }, | ||
{ text: '页面3', value: 700 }, | ||
], | ||
transform: [ | ||
{ | ||
type: 'symmetryY', | ||
}, | ||
], | ||
axis: { | ||
x: false, | ||
y: false, | ||
}, | ||
style: { | ||
stroke: '#ff0000', | ||
}, | ||
encode: { | ||
x: 'text', | ||
y: 'value', | ||
color: 'text', | ||
shape: 'funnel', | ||
}, | ||
scale: { | ||
x: { paddingOuter: 0, paddingInner: 0 }, | ||
color: { type: 'ordinal', range: ['red', 'green', 'blue', '#e45ca2'] }, | ||
}, | ||
}; | ||
} |
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,38 @@ | ||
import { G2Spec } from '../../../src'; | ||
|
||
export function alphabetIntervalPyramid(): G2Spec { | ||
return { | ||
type: 'interval', | ||
coordinate: { | ||
transform: [{ type: 'transpose' }], | ||
}, | ||
data: [ | ||
{ text: '页面', value: 1000 }, | ||
{ text: '页面1', value: 900 }, | ||
{ text: '页面2', value: 800 }, | ||
{ text: '页面3', value: 700 }, | ||
], | ||
transform: [ | ||
{ | ||
type: 'symmetryY', | ||
}, | ||
], | ||
axis: { | ||
x: false, | ||
y: false, | ||
}, | ||
style: { | ||
stroke: '#ff0000', | ||
}, | ||
encode: { | ||
x: 'text', | ||
y: 'value', | ||
color: 'text', | ||
shape: 'pyramid', | ||
}, | ||
scale: { | ||
x: { paddingOuter: 0, paddingInner: 0 }, | ||
color: { type: 'ordinal', range: ['red', 'green', 'blue', '#e45ca2'] }, | ||
}, | ||
}; | ||
} |
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