{"action":"created","issue":{"url":"https://api.github.com/repos/ecomfe/echarts/issues/3997","repository_url":"https://api.github.com/repos/ecomfe/echarts","labels_url":"https://api.github.com/repos/ecomfe/echarts/issues/3997/labels{/name}","comments_url":"https://api.github.com/repos/ecomfe/echarts/issues/3997/comments","events_url":"https://api.github.com/repos/ecomfe/echarts/issues/3997/events","html_url":"https://github.com/ecomfe/echarts/issues/3997","id":174664729,"number":3997,"title":"echarts-v3.2.1中【type=map】时，省、市名称偏移出该省、市","user":{"login":"occultskyrong","id":8370006,"avatar_url":"https://avatars.githubusercontent.com/u/8370006?v=3","gravatar_id":"","url":"https://api.github.com/users/occultskyrong","html_url":"https://github.com/occultskyrong","followers_url":"https://api.github.com/users/occultskyrong/followers","following_url":"https://api.github.com/users/occultskyrong/following{/other_user}","gists_url":"https://api.github.com/users/occultskyrong/gists{/gist_id}","starred_url":"https://api.github.com/users/occultskyrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/occultskyrong/subscriptions","organizations_url":"https://api.github.com/users/occultskyrong/orgs","repos_url":"https://api.github.com/users/occultskyrong/repos","events_url":"https://api.github.com/users/occultskyrong/events{/privacy}","received_events_url":"https://api.github.com/users/occultskyrong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-02T01:58:39Z","updated_at":"2016-09-27T01:36:17Z","closed_at":null,"body":"<!--\r\n为了方便我们能够复现和修复 bug，请遵从下面的规范描述您的问题。\r\n-->\r\n#### 问题简述 (One-line summary)\r\n1.  原echarts-v2版本中，省下市的名称会正合适的显示在市区域的中间，[全国34个省市自治区](http://echarts.baidu.com/echarts2/doc/example/map3.html#)，如下图所示：\r\n![image](https://cloud.githubusercontent.com/assets/8370006/18189943/8da0454c-70f1-11e6-96f1-ace8883c7b14.png)\r\n2. 在v3.2.1中，下载jiangsu.json后，包括[在线预览](http://echarts.baidu.com/demo.html#map-province)，展示的省市有部分已经超出所属位置，而该市的空白空间还很大，如下图所示：\r\n![image](https://cloud.githubusercontent.com/assets/8370006/18190001/dd7fac24-70f1-11e6-9946-2df3b41378a1.png)\r\n3. 是否可以进行省市名称显示时进行微调？未发现有相关参数。\r\n4. 另v2版本可以给某市增加markpoint，类似于[怎么才能把标有数字的地点名称在地图上显示出来](http://www.oschina.net/question/2003075_166190)\r\nv3版本的Markpoint只提供了基于坐标和(x,y)的设置。。莫非要我一个城市一个城市的去写位置？\r\n还有label中未提供formatter配置项，如何直接显示城市的数据，而不是需要鼠标动作？\r\n\r\n#### 版本及环境 (Version & Environment)\r\n+ ECharts 版本 (ECharts version):`3.2.1`\r\n+ 浏览器类型和版本 (Browser version):`chrome`\r\n+ 操作系统类型和版本 (OS Version):`windows 7`\r\n\r\n#### 重现步骤 (Steps to reproduce)\r\n见上[问题描述]\r\n\r\n#### 期望结果 (Expected behaviour)\r\n1. 市名称可恰当的存在市中心位置，市略小时可超出，但应相对居中。\r\n2. 直接显示某市的数据，而不是鼠标放上才显示。\r\n\r\n#### 可能哪里有问题 (What went wrong)\r\n不知道。。\r\n\r\n#### ECharts配置项 (ECharts option)\r\n<!-- 下方贴你的option，注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。\r\n最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing\r\n-->\r\n# 以下代码可直接运行\r\n```javascript\r\n\r\n(function() {\r\n\r\n    $.get('vendors/echarts/map/json/province/jiangsu.json', function (geoJson) {\r\n\r\n        // myChart.hideLoading();\r\n\r\n        echarts.registerMap('jiangsu', geoJson);\r\n\r\n        myChart.setOption({\r\n                title: {\r\n                    text: '江苏省'\r\n                }, tooltip: {\r\n                    trigger: 'item',\r\n                    formatter: '{b}:<br>{a}:{c}'\r\n                }, dataRange: {\r\n                    min: 0,\r\n                    max: 1000,\r\n                    color: ['red', 'yellow'],\r\n                    text: ['高', '低'],           // 文本，默认为数值文本\r\n                    calculable: true\r\n                }, series: [{\r\n                    name: 'GMV'\r\n                    , type: 'map'\r\n                    , map: 'jiangsu'\r\n                    , label: {\r\n                        normal: {\r\n                            show: true\r\n                            ,textStyle:{\r\n                                fontSize:12\r\n                                ,fontFamily:'Micro YaHei'\r\n                            }\r\n                        },emphasis:{\r\n                            show: true\r\n                            ,textStyle:{\r\n                                fontSize:13\r\n                                ,fontFamily:'Micro YaHei'\r\n                            }\r\n                        }\r\n                    }, data: [\r\n                        {name: '南京市', value: 125}\r\n                    ], markPoint: {\r\n                        label: {\r\n                            normal: {\r\n                                show: true\r\n                                ,formatter:\"{c}\"\r\n                            }\r\n                        }, data: [//data数据每个城市都有，一个一个去定义xy?\r\n                            {name: '南京市', x: 100, y: 100,value:'测试'}\r\n                            ,{name: '如何把这个游标放在城市的位置', x: 200, y: 200,value:'测试'}\r\n                        ]\r\n                    }\r\n                }]\r\n            });\r\n    });\r\n}());\r\n```\r\n\r\n\r\n#### 其他信息 (Other comments)\r\n<!-- 例如，截图或线上实例 (JSFiddle/JSBin/Codepen) (For example: Screenshot or Online demo) -->\r\n\r\n![image](https://cloud.githubusercontent.com/assets/8370006/18190242/c6889772-70f3-11e6-8c88-548100fae0c9.png)\r\n"},"comment":{"url":"https://api.github.com/repos/ecomfe/echarts/issues/comments/249744009","html_url":"https://github.com/ecomfe/echarts/issues/3997#issuecomment-249744009","issue_url":"https://api.github.com/repos/ecomfe/echarts/issues/3997","id":249744009,"user":{"login":"occultskyrong","id":8370006,"avatar_url":"https://avatars.githubusercontent.com/u/8370006?v=3","gravatar_id":"","url":"https://api.github.com/users/occultskyrong","html_url":"https://github.com/occultskyrong","followers_url":"https://api.github.com/users/occultskyrong/followers","following_url":"https://api.github.com/users/occultskyrong/following{/other_user}","gists_url":"https://api.github.com/users/occultskyrong/gists{/gist_id}","starred_url":"https://api.github.com/users/occultskyrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/occultskyrong/subscriptions","organizations_url":"https://api.github.com/users/occultskyrong/orgs","repos_url":"https://api.github.com/users/occultskyrong/repos","events_url":"https://api.github.com/users/occultskyrong/events{/privacy}","received_events_url":"https://api.github.com/users/occultskyrong/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T01:36:17Z","updated_at":"2016-09-27T01:36:17Z","body":"@philoyang 他这个因为是基于canvas的，所以本身不能可能支持html标记。。\r\n但是可以用`\\n`来进行换行，同时`formatter`可以写回调函数，里面有参数来进行多数据。\r\n当然，抛入数据的时候你需要用数组的数组抛入数据`[[1,2,3],[3,4,5]]`，一次是x、y、数据0、数据1、数据……\r\njust like this\r\n```\r\n[{\"name\":\"常州市\",\"value\":[119.95,31.79,0.27,2],\"symbol\":\"pin\"},{\"name\":\"苏州市\",\"value\":[120.92,31.32,30.12,1],\"symbol\":\"pin\"}]\r\n```\r\n然后`formatter`中就可以使用回调的params中value来进行选取，具体看上边的代码。"}}
{"actor":{"display_login":"occultskyrong"}}