-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat-plugin-plot
- Loading branch information
Showing
26 changed files
with
262 additions
and
53 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Pie } from '@antv/g2plot'; | ||
|
||
const data = [ | ||
{ type: '分类一', value: 27 }, | ||
{ type: '分类二', value: 25 }, | ||
{ type: '分类三', value: 18 }, | ||
{ type: '分类四', value: 15 }, | ||
{ type: '分类五', value: 10 }, | ||
{ type: '其他', value: 5 }, | ||
]; | ||
|
||
const piePlot = new Pie('container', { | ||
appendPadding: 10, | ||
data, | ||
angleField: 'value', | ||
colorField: 'type', | ||
radius: 0.8, | ||
label: { | ||
type: 'outer', | ||
content: '{name} {percentage}', | ||
}, | ||
interactions: [{ type: 'pie-legend-active' }], | ||
}); | ||
|
||
piePlot.render(); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { Radar } from '@antv/g2plot'; | ||
|
||
fetch('https://gw.alipayobjects.com/os/bmw-prod/5c41aa9b-9c8a-425f-9f4d-934b889bb75d.json') | ||
.then((data) => data.json()) | ||
.then((data) => { | ||
const radarPlot = new Radar('container', { | ||
data, | ||
xField: 'item', | ||
yField: 'score', | ||
seriesField: 'user', | ||
xAxis: { | ||
label: { | ||
offset: 15, | ||
}, | ||
grid: { | ||
line: { | ||
type: 'line', | ||
}, | ||
}, | ||
}, | ||
yAxis: { | ||
grid: { | ||
line: { | ||
type: 'circle', | ||
}, | ||
}, | ||
}, | ||
tooltip: { | ||
crosshairs: { | ||
type: 'xy', | ||
line: { | ||
style: { | ||
stroke: '#565656', | ||
lineDash: [4], | ||
}, | ||
}, | ||
follow: true, | ||
}, | ||
}, | ||
point: { | ||
shape: 'circle', | ||
}, | ||
// 开启面积 | ||
area: {}, | ||
legend: { | ||
position: 'bottom', | ||
}, | ||
}); | ||
radarPlot.render(); | ||
}); |
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
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
Oops, something went wrong.