Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
0b64c2ae
I
incubator-echarts
项目概览
x649585723
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
0b64c2ae
编写于
10月 25, 2015
作者:
L
lang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Map fix
上级
59053a66
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
36 addition
and
33 deletion
+36
-33
src/chart/map/MapSeries.js
src/chart/map/MapSeries.js
+5
-2
src/chart/map/MapView.js
src/chart/map/MapView.js
+30
-24
src/chart/map/mapDataStatistic.js
src/chart/map/mapDataStatistic.js
+1
-3
src/chart/map/mapSymbolLayout.js
src/chart/map/mapSymbolLayout.js
+0
-4
未找到文件。
src/chart/map/MapSeries.js
浏览文件 @
0b64c2ae
...
@@ -37,10 +37,13 @@ define(function (require) {
...
@@ -37,10 +37,13 @@ define(function (require) {
needsDrawMap
:
false
,
needsDrawMap
:
false
,
init
:
function
(
option
,
parentModel
,
ecModel
,
dependentModels
,
seriesIndex
)
{
init
:
function
(
option
,
parentModel
,
ecModel
,
dependentModels
,
seriesIndex
)
{
option
=
this
.
_fillOption
(
option
);
this
.
option
=
option
;
SeriesModel
.
prototype
.
init
.
call
(
SeriesModel
.
prototype
.
init
.
call
(
this
,
option
,
parentModel
,
ecModel
,
dependentModels
,
seriesIndex
this
,
option
,
parentModel
,
ecModel
,
dependentModels
,
seriesIndex
);
);
option
=
this
.
_fillOption
(
option
);
this
.
updateSelectedMap
();
this
.
updateSelectedMap
();
},
},
...
@@ -56,8 +59,8 @@ define(function (require) {
...
@@ -56,8 +59,8 @@ define(function (require) {
},
},
mergeOption
:
function
(
newOption
)
{
mergeOption
:
function
(
newOption
)
{
SeriesModel
.
prototype
.
mergeOption
.
call
(
this
,
newOption
);
newOption
=
this
.
_fillOption
(
newOption
);
newOption
=
this
.
_fillOption
(
newOption
);
SeriesModel
.
prototype
.
mergeOption
.
call
(
this
,
newOption
);
this
.
updateSelectedMap
();
this
.
updateSelectedMap
();
},
},
...
...
src/chart/map/MapView.js
浏览文件 @
0b64c2ae
...
@@ -40,9 +40,6 @@ define(function (require) {
...
@@ -40,9 +40,6 @@ define(function (require) {
var
group
=
this
.
group
;
var
group
=
this
.
group
;
data
.
each
(
'
value
'
,
function
(
value
,
idx
)
{
data
.
each
(
'
value
'
,
function
(
value
,
idx
)
{
if
(
isNaN
(
value
))
{
return
;
}
var
itemModel
=
data
.
getItemModel
(
idx
);
var
itemModel
=
data
.
getItemModel
(
idx
);
var
labelModel
=
itemModel
.
getModel
(
'
label.normal
'
);
var
labelModel
=
itemModel
.
getModel
(
'
label.normal
'
);
var
textStyleModel
=
labelModel
.
getModel
(
'
textStyle
'
);
var
textStyleModel
=
labelModel
.
getModel
(
'
textStyle
'
);
...
@@ -51,30 +48,39 @@ define(function (require) {
...
@@ -51,30 +48,39 @@ define(function (require) {
var
point
=
layout
.
point
;
var
point
=
layout
.
point
;
var
offset
=
layout
.
offset
;
var
offset
=
layout
.
offset
;
var
circle
=
new
graphic
.
Circle
({
var
showLabel
=
labelModel
.
get
(
'
show
'
);
style
:
{
fill
:
data
.
getVisual
(
'
color
'
)
var
labelText
=
data
.
getName
(
idx
);
},
var
labelColor
=
textStyleModel
.
get
(
'
color
'
);
shape
:
{
var
labelFont
=
textStyleModel
.
getFont
();
cx
:
point
[
0
]
+
offset
*
9
,
cy
:
point
[
1
],
if
(
!
isNaN
(
value
))
{
r
:
3
var
circle
=
new
graphic
.
Circle
({
},
style
:
{
silent
:
true
,
fill
:
data
.
getVisual
(
'
color
'
)
},
z2
:
10
shape
:
{
});
cx
:
point
[
0
]
+
offset
*
9
,
cy
:
point
[
1
],
if
(
labelModel
.
get
(
'
show
'
)
&&
!
offset
)
{
r
:
3
circle
.
setStyle
({
},
text
:
data
.
getName
(
idx
),
silent
:
true
,
textFill
:
textStyleModel
.
get
(
'
color
'
),
textPosition
:
'
bottom
'
,
z2
:
10
textFont
:
textStyleModel
.
getFont
()
});
});
if
(
showLabel
&&
!
offset
)
{
circle
.
setStyle
({
text
:
labelText
,
textFill
:
labelColor
,
textPosition
:
'
bottom
'
,
textFont
:
labelFont
});
}
group
.
add
(
circle
);
}
}
group
.
add
(
circle
);
});
});
}
}
});
});
...
...
src/chart/map/mapDataStatistic.js
浏览文件 @
0b64c2ae
...
@@ -2,8 +2,6 @@ define(function (require) {
...
@@ -2,8 +2,6 @@ define(function (require) {
var
zrUtil
=
require
(
'
zrender/core/util
'
);
var
zrUtil
=
require
(
'
zrender/core/util
'
);
var
List
=
require
(
'
../../data/List
'
);
// FIXME 公用?
// FIXME 公用?
/**
/**
* @param {Array.<module:echarts/data/List>} datas
* @param {Array.<module:echarts/data/List>} datas
...
@@ -34,7 +32,7 @@ define(function (require) {
...
@@ -34,7 +32,7 @@ define(function (require) {
if
(
statisticsType
===
'
average
'
)
{
if
(
statisticsType
===
'
average
'
)
{
sum
/=
len
;
sum
/=
len
;
}
}
return
sum
;
return
len
===
0
?
NaN
:
sum
;
});
});
}
}
...
...
src/chart/map/mapSymbolLayout.js
浏览文件 @
0b64c2ae
...
@@ -10,10 +10,6 @@ define(function (require) {
...
@@ -10,10 +10,6 @@ define(function (require) {
var
data
=
mapModel
.
getData
();
var
data
=
mapModel
.
getData
();
data
.
each
(
'
value
'
,
function
(
value
,
idx
)
{
data
.
each
(
'
value
'
,
function
(
value
,
idx
)
{
if
(
isNaN
(
value
))
{
return
;
}
var
name
=
data
.
getName
(
idx
);
var
name
=
data
.
getName
(
idx
);
var
region
=
geo
.
getRegion
(
name
);
var
region
=
geo
.
getRegion
(
name
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录