单轴坐标系散点图
javascript
复制代码
option = {
tooltip:{},
singleAxis:[
{
type:'category',
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
bottom:'55%'
},
{
type:'category',
data: ['一', '二', '三', '四', '五', '六', '日'],
top:'55%'
},
],
series: [
{
type: 'scatter',
coordinateSystem:'singleAxis',
singleAxisIndex:0,
data: [
10,
10,
30,
40,
10,
20,
100
],
label:{
//formatter:'{b}\n{d}%'
}
},
{
type: 'scatter',
coordinateSystem:'singleAxis',
singleAxisIndex:1,
data: [
10,
10,
30,
40,
10,
20,
100
],
label:{
//formatter:'{b}\n{d}%'
}
},
]
};
参数化Symbol大小
javascript
复制代码
option = {
tooltip:{},
singleAxis:[
{
type:'category',
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
bottom:'55%'
},
{
type:'category',
data: ['一', '二', '三', '四', '五', '六', '日'],
top:'55%'
},
],
series: [
{
type: 'scatter',
coordinateSystem:'singleAxis',
singleAxisIndex:0,
data: [
10,
10,
30,
40,
10,
20,
100
],
symbolSize:function(value){
return value*2/2;
},
label:{
//formatter:'{b}\n{d}%'
}
},
{
type: 'scatter',
coordinateSystem:'singleAxis',
singleAxisIndex:1,
data: [
10,
10,
30,
40,
10,
20,
100
],
symbolSize:function(value){
return value*2/3;
},
label:{
//formatter:'{b}\n{d}%'
}
},
]
};