Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
missman
incubator-echarts
提交
0afdb7bb
I
incubator-echarts
项目概览
missman
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
incubator-echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0afdb7bb
编写于
10月 14, 2015
作者:
L
lang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Map location competitable with 2.0
上级
146ab530
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
40 addition
and
15 deletion
+40
-15
src/chart/map/MapSeries.js
src/chart/map/MapSeries.js
+1
-1
src/chart/map/MapView.js
src/chart/map/MapView.js
+1
-1
src/coord/geo/GeoModel.js
src/coord/geo/GeoModel.js
+3
-1
src/coord/geo/geoCreator.js
src/coord/geo/geoCreator.js
+29
-7
test/geoScatter.html
test/geoScatter.html
+4
-4
test/mapWorld.html
test/mapWorld.html
+2
-1
未找到文件。
src/chart/map/MapSeries.js
浏览文件 @
0afdb7bb
...
...
@@ -77,7 +77,7 @@ define(function (require) {
// mapValueCalculation: 'sum',
// 地图数值计算结果小数精度
// mapValuePrecision: 0,
// 显示图例颜色标识(系列标识的小圆点)
// 显示图例颜色标识(系列标识的小圆点)
,图例开启时有效
showLegendSymbol
:
true
,
// 选择模式,默认关闭,可选single,multiple
// selectedMode: false,
...
...
src/chart/map/MapView.js
浏览文件 @
0afdb7bb
...
...
@@ -13,7 +13,7 @@ define(function (require) {
mapModel
.
needsDrawMap
&&
this
.
_renderArea
(
mapModel
,
ecModel
,
api
);
mapModel
.
get
(
'
showLegendSymbol
'
)
mapModel
.
get
(
'
showLegendSymbol
'
)
&&
ecModel
.
getComponent
(
'
legend
'
)
&&
this
.
_renderSymbols
(
mapModel
,
ecModel
,
api
);
},
...
...
src/coord/geo/GeoModel.js
浏览文件 @
0afdb7bb
...
...
@@ -17,7 +17,9 @@ define(function (require) {
z
:
0
,
center
:
[
'
50%
'
,
'
50%
'
],
x
:
'
center
'
,
y
:
'
center
'
,
width
:
'
70%
'
,
...
...
src/coord/geo/geoCreator.js
浏览文件 @
0afdb7bb
...
...
@@ -14,14 +14,12 @@ define(function (require) {
* @param {module:echarts/ExtensionAPI} api
*/
var
resizeGeo
=
function
(
locModel
,
api
)
{
var
center
;
if
(
locModel
.
type
===
'
series.map
'
)
{
locModel
=
locModel
.
getModel
(
'
mapLocation
'
);
center
=
[
locModel
.
get
(
'
x
'
),
locModel
.
get
(
'
y
'
)];
}
else
{
center
=
locModel
.
get
(
'
center
'
);
}
var
x
=
locModel
.
get
(
'
x
'
);
var
y
=
locModel
.
get
(
'
y
'
);
var
width
=
locModel
.
get
(
'
width
'
);
var
height
=
locModel
.
get
(
'
height
'
);
...
...
@@ -29,8 +27,9 @@ define(function (require) {
var
viewHeight
=
api
.
getHeight
();
var
parsePercent
=
numberUtil
.
parsePercent
;
var
cx
=
parsePercent
(
center
[
0
],
viewWidth
);
var
cy
=
parsePercent
(
center
[
1
],
viewHeight
);
var
cx
=
parsePercent
(
x
,
viewWidth
);
var
cy
=
parsePercent
(
y
,
viewHeight
);
width
=
parsePercent
(
width
,
viewWidth
);
height
=
parsePercent
(
height
,
viewHeight
);
...
...
@@ -44,6 +43,29 @@ define(function (require) {
width
=
rect
.
width
/
rect
.
height
*
height
;
}
// Special position
// FIXME
switch
(
x
)
{
case
'
center
'
:
break
;
case
'
right
'
:
cx
-=
width
;
break
;
default
:
cx
+=
width
/
2
;
break
;
}
switch
(
y
)
{
case
'
center
'
:
break
;
case
'
bottom
'
:
cy
-=
height
;
break
;
default
:
cy
+=
height
/
2
;
break
;
}
this
.
transformTo
(
cx
,
cy
,
width
,
height
);
}
...
...
test/geoScatter.html
浏览文件 @
0afdb7bb
...
...
@@ -16,14 +16,14 @@
require
([
'
echarts
'
,
'
geoJson/
world
_geo
'
,
'
geoJson/
china
_geo
'
,
'
echarts/chart/scatter
'
,
'
echarts/component/legend
'
,
'
echarts/component/geo
'
],
function
(
echarts
,
world
Json
)
{
],
function
(
echarts
,
china
Json
)
{
echarts
.
registerMap
(
'
world
'
,
world
Json
);
echarts
.
registerMap
(
'
china
'
,
china
Json
);
var
placeList
=
[
{
name
:
'
海门
'
,
geoCoord
:[
121.15
,
31.89
]},
...
...
@@ -252,7 +252,7 @@
data
:
[
'
scatter
'
,
'
scatter2
'
]
},
geo
:
{
map
:
'
world
'
map
:
'
china
'
},
tooltip
:
{
trigger
:
'
axis
'
,
...
...
test/mapWorld.html
浏览文件 @
0afdb7bb
...
...
@@ -75,7 +75,8 @@
type
:
'
map
'
,
mapType
:
'
world
'
,
mapLocation
:
{
// y : 60
y
:
60
,
width
:
'
80%
'
},
itemStyle
:
itemStyle
,
data
:[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录