-
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
4 changed files
with
98 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { G2Spec } from '../../../src'; | ||
|
||
export function mockPieOutside(): G2Spec { | ||
return { | ||
type: 'interval', | ||
data: [ | ||
{ type: '微博A', value: 93.33 }, | ||
{ type: '其他A', value: 6.67 }, | ||
{ type: '论坛A', value: 4.77 }, | ||
{ type: '网站A', value: 1.44 }, | ||
{ type: '微信A', value: 1.12 }, | ||
{ type: '客户A', value: 1.05 }, | ||
{ type: '新闻A', value: 0.81 }, | ||
{ type: '视频A', value: 0.39 }, | ||
{ type: '博客A', value: 0.37 }, | ||
{ type: '报刊A', value: 0.17 }, | ||
], | ||
encode: { | ||
y: 'value', | ||
color: 'type', | ||
}, | ||
labels: [ | ||
{ | ||
position: 'outside', | ||
text: (obj) => `${obj.type} (${obj.value})`, | ||
}, | ||
], | ||
transform: [{ type: 'stackY' }], | ||
coordinate: { type: 'theta' }, | ||
}; | ||
} |
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