Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
missman
incubator-echarts
提交
3c060e59
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,发现更多精彩内容 >>
提交
3c060e59
编写于
10月 15, 2015
作者:
P
pah100
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/pissang/echarts-next
上级
2a2af15d
7048e6e5
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
54 addition
and
24 deletion
+54
-24
src/chart/map/MapSeries.js
src/chart/map/MapSeries.js
+4
-4
src/chart/map/MapView.js
src/chart/map/MapView.js
+6
-2
src/coord/geo/GeoModel.js
src/coord/geo/GeoModel.js
+3
-1
src/coord/geo/geoCreator.js
src/coord/geo/geoCreator.js
+29
-7
src/util/layout.js
src/util/layout.js
+0
-1
test/geoScatter.html
test/geoScatter.html
+4
-4
test/mapWorld.html
test/mapWorld.html
+8
-5
未找到文件。
src/chart/map/MapSeries.js
浏览文件 @
3c060e59
...
...
@@ -77,7 +77,7 @@ define(function (require) {
// mapValueCalculation: 'sum',
// 地图数值计算结果小数精度
// mapValuePrecision: 0,
// 显示图例颜色标识(系列标识的小圆点)
// 显示图例颜色标识(系列标识的小圆点)
,图例开启时有效
showLegendSymbol
:
true
,
// 选择模式,默认关闭,可选single,multiple
// selectedMode: false,
...
...
@@ -90,9 +90,10 @@ define(function (require) {
itemStyle
:
{
normal
:
{
// color: 各异,
borderWidth
:
0
,
borderWidth
:
0.5
,
borderColor
:
'
#444
'
,
areaStyle
:
{
color
:
'
#
ccc
'
color
:
'
#
eee
'
},
label
:
{
show
:
false
,
...
...
@@ -104,7 +105,6 @@ define(function (require) {
// 也是选中样式
emphasis
:
{
// color: 各异,
borderWidth
:
0
,
areaStyle
:
{
color
:
'
rgba(255,215,0,0.8)
'
},
...
...
src/chart/map/MapView.js
浏览文件 @
3c060e59
...
...
@@ -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
);
},
...
...
@@ -27,8 +27,9 @@ define(function (require) {
group
.
add
(
mapGroup
);
var
scale
=
geo
.
scale
;
mapGroup
.
position
=
geo
.
position
.
slice
();
mapGroup
.
scale
=
geo
.
scale
.
slice
();
mapGroup
.
scale
=
scale
.
slice
();
zrUtil
.
each
(
geo
.
regions
,
function
(
region
)
{
...
...
@@ -58,6 +59,9 @@ define(function (require) {
itemStyle
);
styleObj
.
lineWidth
&&
(
styleObj
.
lineWidth
/=
scale
[
0
]);
hoverItemStyle
.
lineWidth
&&
(
hoverItemStyle
.
lineWidth
/=
scale
[
0
]);
zrUtil
.
each
(
region
.
contours
,
function
(
contour
)
{
var
polygon
=
new
graphic
.
Polygon
({
...
...
src/coord/geo/GeoModel.js
浏览文件 @
3c060e59
...
...
@@ -17,7 +17,9 @@ define(function (require) {
z
:
0
,
center
:
[
'
50%
'
,
'
50%
'
],
x
:
'
center
'
,
y
:
'
center
'
,
width
:
'
70%
'
,
...
...
src/coord/geo/geoCreator.js
浏览文件 @
3c060e59
...
...
@@ -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
);
}
...
...
src/util/layout.js
浏览文件 @
3c060e59
...
...
@@ -45,7 +45,6 @@ define(function(require) {
*/
layout
.
hbox
=
zrUtil
.
curry
(
boxLayout
,
'
horizontal
'
);
/**
* Position group of component in viewport
* Group position is specified by either
...
...
test/geoScatter.html
浏览文件 @
3c060e59
...
...
@@ -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
浏览文件 @
3c060e59
...
...
@@ -33,14 +33,16 @@
var
itemStyle
=
{
normal
:{
borderWidth
:
0.5
,
borderColor
:
'
black
'
,
label
:{
show
:
true
}
},
emphasis
:{
label
:{
show
:
true
},
shadowOffsetX
:
0
,
shadowOffsetY
:
0
,
shadowBlur
:
20
,
shadowColor
:
'
rgba(0, 0, 0, 0.3)
'
//
shadowOffsetX: 0,
//
shadowOffsetY: 0,
//
shadowBlur: 20,
//
shadowColor: 'rgba(0, 0, 0, 0.3)'
}
}
...
...
@@ -75,7 +77,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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录