-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs(scatter): 散点图的 demo 走查 & 新增伪 3D 气泡图 预览地址: https://gw.alipayobjects.com/zos/antfincdn/%26Gzzn7RM81/83252692-ca94-40eb-be60-5f9bb591683a.png * feat(scatter): 散点图支持changedata 动态更新 & 测试 * fix(scatter): 修复 build 问题
- Loading branch information
Showing
9 changed files
with
153 additions
and
17 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,43 @@ | ||
import { Scatter } from '@antv/g2plot'; | ||
|
||
fetch('https://gw.alipayobjects.com/os/antfincdn/t81X1wXdoj/scatter-data.json') | ||
.then((res) => res.json()) | ||
.then((data) => { | ||
const scatterPlot = new Scatter('container', { | ||
appendPadding: 30, | ||
data, | ||
xField: 'x', | ||
yField: 'y', | ||
colorField: 'genre', | ||
color: [ | ||
'r(0.4, 0.3, 0.7) 0:rgba(255,255,255,0.5) 1:#5B8FF9', | ||
'r(0.4, 0.4, 0.7) 0:rgba(255,255,255,0.5) 1:#61DDAA', | ||
], | ||
sizeField: 'size', | ||
size: [5, 20], | ||
shape: 'circle', | ||
yAxis: { | ||
nice: true, | ||
line: { | ||
style: { | ||
stroke: '#eee', | ||
}, | ||
}, | ||
}, | ||
xAxis: { | ||
grid: { | ||
line: { | ||
style: { | ||
stroke: '#eee', | ||
}, | ||
}, | ||
}, | ||
line: { | ||
style: { | ||
stroke: '#eee', | ||
}, | ||
}, | ||
}, | ||
}); | ||
scatterPlot.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--- | ||
title: Bubble | ||
order: 0 | ||
order: 1 | ||
--- |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--- | ||
title: 气泡图 | ||
order: 0 | ||
order: 1 | ||
--- |
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