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/07/02 08:00:02 UTC
[GitHub] shentao1 opened a new issue #8624: lines飞线setOption时symbolSize无效
shentao1 opened a new issue #8624: lines飞线setOption时symbolSize无效
URL: https://github.com/apache/incubator-echarts/issues/8624
<!--
为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
-->
### One-line summary [问题简述]
地图中飞线使用setOption更新实例时,symbolSize 参数无效
### Version & Environment [版本及环境]
+ ECharts version [ECharts 版本]:4.1.0
+ Browser version [浏览器类型和版本]:版本 67.0.3396.87(正式版本) (64 位)
+ OS Version [操作系统类型和版本]:W7
### Expected behaviour [期望结果]
setOption(option,true) 时,能正确渲染 series.lines.symbolSize 参数的值
### ECharts option [ECharts配置项]
<!-- Copy and paste your 'echarts option' here. -->
<!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
```javascript
option = {
"tooltip": {
"show": true,
"trigger": "item",
"axisPointer": {
"lineStyle": {
"color": "#4191fa",
"type": "dashed"
}
}
},
"legend": {
"show": true,
"textStyle": {
"color": "#999999",
"fontSize": 12,
"fontFamily": "sans-serif"
},
"left": "left",
"top": "auto",
"right": "auto",
"bottom": "auto",
"itemGap": 10,
"orient": "horizontal"
},
"geo": {
"show": true,
"map": "china",
"left": 20,
"top": 20,
"right": 20,
"bottom": 20,
"roam": false,
"aspectScale": 0.75,
"zoom": 1,
"selectedMode": false,
"label": {
"show": false,
"position": "top",
"distance": 5,
"rotate": 0,
"offset": [
0,
0
],
"formatter": null,
"color": "#999999",
"fontStyle": "normal",
"fontWeight": "normal",
"fontSize": 12,
"fontFamily": "sans-serif",
"align": "center",
"verticalAlign": "top",
"backgroundColor": "transparent",
"borderColor": "#fff",
"borderWidth": 0
},
"itemStyle": {
"color": "#4191FA",
"borderColor": "#fff",
"borderWidth": 1,
"borderType": "solid",
"opacity": 1,
"shadowBlur": 0,
"areaColor": "#2e2e58"
},
"emphasis": {
"label": {
"show": false,
"position": "top",
"distance": 5,
"rotate": 0,
"offset": [
0,
0
],
"formatter": null,
"color": "#999999",
"fontStyle": "normal",
"fontWeight": "normal",
"fontSize": 12,
"fontFamily": "sans-serif",
"align": "center",
"verticalAlign": "top",
"backgroundColor": "transparent",
"borderColor": "#fff",
"borderWidth": 0
},
"itemStyle": {
"color": "#4191FA",
"borderColor": "#fff",
"borderWidth": 1,
"borderType": "solid",
"opacity": 0.8,
"shadowBlur": 0,
"areaColor": "rgba(67,188,240,0.25)"
}
}
},
"visualMap": [
{
"show": false,
"type": "continuous",
"min": 0,
"max": 1000,
"calculable": false,
"precision": 0,
"itemWidth": 20,
"itemHeight": 140,
"seriesIndex": 0,
"seriesValue": "value",
"dimension": "value",
"inRange": {
"color": [
"#ebf3fe",
"#4191fa"
]
},
"orient": "vertical",
"left": "left",
"top": "bottom",
"right": 20,
"bottom": 20
}
],
"dataset": [
{
"source": [
[
121.15,
31.89,
"海门"
],
[
109.781327,
39.608266,
"鄂尔多斯"
],
[
123.97,
47.33,
"齐齐哈尔"
],
[
120.33,
36.07,
"青岛"
],
[
118.58,
24.93,
"泉州"
],
[
121.05,
32.08,
"南通"
],
[
91.11,
29.97,
"拉萨"
],
[
116.1,
24.55,
"梅州"
],
[
121.48,
31.22,
"上海"
],
[
101.718637,
26.582347,
"攀枝花"
],
[
118.1,
24.46,
"厦门"
],
[
116.63,
23.68,
"潮州"
]
],
"dimensions": [
"lng",
"lat",
"itemName"
]
}
],
"series": [
{
"type": "map",
"name": "",
"value": "value",
"map": "china",
"geoIndex": 0,
"data": [
{
"name": "北京",
"value": 75
},
{
"name": "天津",
"value": 83
},
{
"name": "上海",
"value": 656
},
{
"name": "重庆",
"value": 858
},
{
"name": "河北",
"value": 40
},
{
"name": "河南",
"value": 347
},
{
"name": "云南",
"value": 648
},
{
"name": "辽宁",
"value": 428
},
{
"name": "黑龙江",
"value": 385
},
{
"name": "湖南",
"value": 240
},
{
"name": "安徽",
"value": 234
},
{
"name": "山东",
"value": 839
},
{
"name": "新疆",
"value": 239
},
{
"name": "江苏",
"value": 282
},
{
"name": "浙江",
"value": 203
},
{
"name": "江西",
"value": 571
},
{
"name": "湖北",
"value": 881
},
{
"name": "广西",
"value": 234
},
{
"name": "甘肃",
"value": 621
},
{
"name": "山西",
"value": 646
},
{
"name": "内蒙古",
"value": 249
},
{
"name": "陕西",
"value": 592
},
{
"name": "吉林",
"value": 788
},
{
"name": "福建",
"value": 427
},
{
"name": "贵州",
"value": 771
},
{
"name": "广东",
"value": 280
},
{
"name": "青海",
"value": 139
},
{
"name": "西藏",
"value": 511
},
{
"name": "四川",
"value": 382
},
{
"name": "宁夏",
"value": 232
},
{
"name": "海南",
"value": 374
},
{
"name": "台湾",
"value": 55
},
{
"name": "香港",
"value": 847
},
{
"name": "澳门",
"value": 877
}
]
},
{
"type": "lines",
"name": "北京恶意信息",
"value": "北京恶意信息",
"coordinateSystem": "geo",
"effect": {
"show": true,
"period": 4,
"delay": 0,
"symbol": "triangle",
"symbolSize": 6,
"color": "#b71717",
"trailLength": 0.2,
"loop": true
},
"symbol": "emptyCircle",
"symbolSize": 12,
"lineStyle": {
"color": "#791010",
"width": 2,
"type": "solid",
"curveness": 0.3
},
"label": {
"show": true,
"position": "end",
"distance": 5,
"rotate": 0,
"offset": [
0,
0
],
"formatter": "{b}",
"color": "#999999",
"fontStyle": "normal",
"fontWeight": "normal",
"fontSize": 12,
"fontFamily": "sans-serif",
"align": "center",
"verticalAlign": "top",
"backgroundColor": "transparent",
"borderColor": "#fff",
"borderWidth": 0
},
"emphasis": {
"label": {
"show": true,
"position": "end",
"distance": 5,
"rotate": 0,
"offset": [
0,
0
],
"formatter": "{b}",
"color": "#999999",
"fontStyle": "normal",
"fontWeight": "normal",
"fontSize": 12,
"fontFamily": "sans-serif",
"align": "center",
"verticalAlign": "top",
"backgroundColor": "transparent",
"borderColor": "#fff",
"borderWidth": 0
},
"lineStyle": {
"color": "#791010",
"width": 2,
"type": "solid"
}
},
"data": [
{
"name": "海门",
"coords": [
[
121.15,
31.89
],
[
121.15,
31.89
]
]
},
{
"name": "鄂尔多斯",
"coords": [
[
121.15,
31.89
],
[
109.781327,
39.608266
]
]
},
{
"name": "齐齐哈尔",
"coords": [
[
121.15,
31.89
],
[
123.97,
47.33
]
]
},
{
"name": "青岛",
"coords": [
[
121.15,
31.89
],
[
120.33,
36.07
]
]
},
{
"name": "泉州",
"coords": [
[
121.15,
31.89
],
[
118.58,
24.93
]
]
},
{
"name": "南通",
"coords": [
[
121.15,
31.89
],
[
121.05,
32.08
]
]
},
{
"name": "拉萨",
"coords": [
[
121.15,
31.89
],
[
91.11,
29.97
]
]
},
{
"name": "梅州",
"coords": [
[
121.15,
31.89
],
[
116.1,
24.55
]
]
},
{
"name": "上海",
"coords": [
[
121.15,
31.89
],
[
121.48,
31.22
]
]
},
{
"name": "攀枝花",
"coords": [
[
121.15,
31.89
],
[
101.718637,
26.582347
]
]
},
{
"name": "厦门",
"coords": [
[
121.15,
31.89
],
[
118.1,
24.46
]
]
},
{
"name": "潮州",
"coords": [
[
121.15,
31.89
],
[
116.63,
23.68
]
]
}
]
}
]
};
//初始化渲染正常,setOption更新时,option.series[1].symbolSize的值未被正确渲染
setTimeout(function() {
// option.series[1].symbol = "diamond";
option.series[1].symbolSize =120;
myChart.setOption(option,true);
console.log(option.series[1]);
}, 2000,myChart,option);
```
### Other comments [其他信息]
<!-- For example: Screenshot or Online demo -->
<!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
![image](https://user-images.githubusercontent.com/20812348/42151864-f1452120-7e10-11e8-95ea-72d53d7e2af5.png)
----------------------------------------------------------------
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