Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 优化散点图 demos #1608

Merged
merged 1 commit into from
Sep 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion examples/scatter/basic/demo/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ fetch('https://gw.alipayobjects.com/os/antfincdn/aao6XnO5pW/IMDB.json')
yField: 'Rating',
shape: 'circle',
yAxis: {
grid: {},
line: {
style: {
stroke: '#aaa',
},
},
},
xAxis: {
min: -100,
Expand All @@ -22,6 +26,11 @@ fetch('https://gw.alipayobjects.com/os/antfincdn/aao6XnO5pW/IMDB.json')
},
},
},
line: {
style: {
stroke: '#aaa',
},
},
},
pointStyle: {
stroke: '#fff',
Expand Down
14 changes: 12 additions & 2 deletions examples/scatter/basic/demo/color-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ fetch('https://gw.alipayobjects.com/os/antfincdn/aao6XnO5pW/IMDB.json')
yField: 'Rating',
shape: 'circle',
colorField: 'Genre',
sizeField: 'Rating',
size: [2, 5],
color: ['#d62728', '#2ca02c', '#000000', '#9467bd', '#ffd500', '#1f77b4', '#00518a', '#ffbc69', '#9bd646'],
size: 4,
yAxis: {
nice: true,
line: {
style: {
stroke: '#aaa',
},
},
},
xAxis: {
min: -100,
Expand All @@ -24,6 +29,11 @@ fetch('https://gw.alipayobjects.com/os/antfincdn/aao6XnO5pW/IMDB.json')
},
},
},
line: {
style: {
stroke: '#aaa',
},
},
},
pointStyle: {
stroke: '#fff',
Expand Down
13 changes: 13 additions & 0 deletions examples/scatter/basic/demo/label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ fetch('https://gw.alipayobjects.com/os/bmw-prod/3e4db10a-9da1-4b44-80d8-c128f427
pointStyle: {
fillOpacity: 1,
},
yAxis: {
nice: true,
line: {
style: {
stroke: '#aaa',
},
},
},
xAxis: {
grid: {
line: {
Expand All @@ -23,6 +31,11 @@ fetch('https://gw.alipayobjects.com/os/bmw-prod/3e4db10a-9da1-4b44-80d8-c128f427
},
},
},
line: {
style: {
stroke: '#aaa',
},
},
},
label: {},
});
Expand Down
8 changes: 0 additions & 8 deletions examples/scatter/basic/demo/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@
"zh": "散点图颜色映射",
"en": "the color mapping of Scatter chart"
},
"screenshot": "https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*Mds9Q7-zeHMAAAAAAAAAAABkARQnAQ"
},
{
"filename": "shape-mapping.ts",
"title": {
"zh": "散点形状色映射",
"en": "the shape mapping of Scatter chart"
},
"screenshot": "https://gw.alipayobjects.com/zos/antfincdn/kRFIJ2OlFs/FE726B54-2352-47F5-AAF9-B17D281CE513.png"
},
{
Expand Down
13 changes: 13 additions & 0 deletions examples/scatter/basic/demo/quadrant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ fetch('https://gw.alipayobjects.com/os/bmw-prod/0b37279d-1674-42b4-b285-29683747
shape: 'circle',
pointStyle: {
fillOpacity: 0.8,
stroke: '#bbb',
},
xAxis: {
min: -25,
Expand All @@ -26,6 +27,18 @@ fetch('https://gw.alipayobjects.com/os/bmw-prod/0b37279d-1674-42b4-b285-29683747
},
},
},
line: {
style: {
stroke: '#aaa',
},
},
},
yAxis: {
line: {
style: {
stroke: '#aaa',
},
},
},
quadrant: {
xBaseline: 0,
Expand Down
34 changes: 0 additions & 34 deletions examples/scatter/basic/demo/shape-mapping.ts

This file was deleted.

13 changes: 13 additions & 0 deletions examples/scatter/basic/demo/size.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ fetch('https://gw.alipayobjects.com/os/bmw-prod/0b37279d-1674-42b4-b285-29683747
shape: 'circle',
pointStyle: {
fillOpacity: 0.8,
stroke: '#bbb',
},
xAxis: {
min: -25,
Expand All @@ -26,6 +27,18 @@ fetch('https://gw.alipayobjects.com/os/bmw-prod/0b37279d-1674-42b4-b285-29683747
},
},
},
line: {
style: {
stroke: '#aaa',
},
},
},
yAxis: {
line: {
style: {
stroke: '#aaa',
},
},
},
});
scatterPlot.render();
Expand Down