You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/11/20 08:26:52 UTC
[GitHub] DorisOu commented on issue #9435: 关于series-lines.lineStyle.normal.width映射宽度
DorisOu commented on issue #9435: 关于series-lines.lineStyle.normal.width映射宽度
URL: https://github.com/apache/incubator-echarts/issues/9435#issuecomment-440185362
bmap: {
center: [113.39942, 22.522314],
zoom: 12,
roam: true,
mapStyle: mapStyle
},
title: {
text: '中山市人口迁移',
// left: 'center',
right: 450,
top: 30,
textStyle: {
color: '#fff',
fontSize: 24
}
},
tooltip: {
trigger: 'item',
formatter: function(params) {
if (params.seriesType == "effectScatter") {
console.log(params);
return "线路:" + params.name;
} else if (params.seriesType == "lines") {
return params.data.fromName + ">" + params.data.toName + "<br />" + params.data.value;
} else {
return params.name;
}
}
},
visualMap: {
type: 'piecewise',
zlevel: 3,
splitNumber: 5,
min: 0,
max: 9000,
calculable: true,
seriesIndex: [1, 3, 5], //哪个系列的
dimension: 0, //series.data的哪个维度
inRange: {
color: ['lightskyblue', 'yellow', 'red']
},
textStyle: {
color: '#fff'
},
bottom: 60,
left: 50
},
legend: {
textStyle: {
fontSize: 18
},
selectedMode: 'single',
inactiveColor: '#ccc', //图例关闭时的颜色
data: [{
name: '东区街道',
textStyle: { color: '#00bcff' }
},
{
name: '石岐区街道',
textStyle: { color: '#ff4e00' }
}, {
name: '小榄镇',
textStyle: { color: '#ffd700' }
}
],
left: 50,
top: 30,
itemGap: 30,
itemWidth: 20,
},
series: [{ // 系列一的一些其他配置
name: '东区街道',
type: 'effectScatter',
coordinateSystem: 'bmap',
symbolSize: 3,
zlevel: 3,
rippleEffect: {
brushType: 'stroke'
},
showEffectOn: 'render',
label: {
show: true,
formatter: function(params) {
return params.name
},
position: 'right',
color: '#fff'
},
itemStyle: {
normal: { color: '#00bcff' }
}
},
{ // 系列二的一些其他配置
name: '东区街道',
type: 'lines',
coordinateSystem: 'bmap',
zlevel: 3,
large: true, //启用大规模线图优化(>=5K),不能自定义设置单个数据项的样式,不能启用effect
effect: { //移动点的效果
show: true,
constantSpeed: 30,
symbol: pathCar,
symbolSize: 18,
trailLength: 0,
},
lineStyle: {
normal: {
width: 1,
opacity: 0.9, //数值越大,线的视觉效果越粗
curveness: 0.2 //线的曲度,0~1,越大越弯曲
}
}
},
{ // 系列一的一些其他配置
name: '石岐区街道',
type: 'effectScatter',
coordinateSystem: 'bmap',
symbolSize: 3,
zlevel: 3,
rippleEffect: {
brushType: 'stroke'
},
showEffectOn: 'render',
label: {
show: true,
formatter: function(params) {
return params.name
},
position: 'right',
color: '#fff'
},
itemStyle: {
normal: {
color: '#ff4e00'
}
}
},
{ // 系列二的一些其他配置
name: '石岐区街道',
type: 'lines',
coordinateSystem: 'bmap',
zlevel: 3,
large: true, //启用大规模线图优化(>=5K),不能自定义设置单个数据项的样式,不能启用effect
effect: { //移动点的效果
show: true,
constantSpeed: 30,
symbol: pathCar,
symbolSize: 18,
trailLength: 0,
},
lineStyle: {
normal: {
width: 1,
opacity: 0.9,
curveness: 0.2 //线的曲度,0~1,越大越弯曲
}
}
},
{ // 系列一的一些其他配置
name: '小榄镇',
type: 'effectScatter',
coordinateSystem: 'bmap',
symbolSize: 3,
zlevel: 3,
rippleEffect: {
brushType: 'stroke'
},
showEffectOn: 'render',
label: {
emphasis: {
show: true,
position: 'right',
color: '#fff',
formatter: '{b}'
}
},
itemStyle: {
normal: { color: '#ffd700' }
}
},
{ // 系列二的一些其他配置
name: '小榄镇',
type: 'lines',
coordinateSystem: 'bmap',
zlevel: 3,
large: true, //启用大规模线图优化(>=5K),不能自定义设置单个数据项的样式,不能启用effect
effect: { //移动点的效果
show: true,
constantSpeed: 30,
symbol: pathCar,
symbolSize: 18,
trailLength: 0,
},
lineStyle: {
normal: {
width: 1,
opacity: 0.9,
curveness: 0.2 //线的曲度,0~1,越大越弯曲
}
}
},
{
name: '镇人口分布',
type: 'custom',
coordinateSystem: 'bmap',
zlevel: 2,
data: regionData(paths),
renderItem: renderItem,
itemStyle: {
normal: {
label: { show: false }
},
emphasis: {
label: { show: false }
}
},
tooltip: { show: false }
}
]
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org