Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
ec271391
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,发现更多精彩内容 >>
提交
ec271391
编写于
1月 06, 2016
作者:
P
pah100
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev-3.0.0' of
https://github.com/ecomfe/echarts
into dev-3.0.0
上级
41a4b7f6
5b1e14c9
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
99 addition
and
39 deletion
+99
-39
src/chart/funnel/FunnelSeries.js
src/chart/funnel/FunnelSeries.js
+3
-1
src/chart/funnel/FunnelView.js
src/chart/funnel/FunnelView.js
+1
-1
src/chart/gauge/GaugeSeries.js
src/chart/gauge/GaugeSeries.js
+2
-2
src/chart/graph/GraphSeries.js
src/chart/graph/GraphSeries.js
+22
-3
src/chart/pie/PieSeries.js
src/chart/pie/PieSeries.js
+3
-1
src/component/toolbox/feature/DataView.js
src/component/toolbox/feature/DataView.js
+24
-3
src/data/List.js
src/data/List.js
+26
-12
src/data/Tree.js
src/data/Tree.js
+1
-1
src/layout/barGrid.js
src/layout/barGrid.js
+2
-1
src/model/globalDefault.js
src/model/globalDefault.js
+1
-1
src/scale/Interval.js
src/scale/Interval.js
+13
-11
src/visual/dataColor.js
src/visual/dataColor.js
+1
-2
未找到文件。
src/chart/funnel/FunnelSeries.js
浏览文件 @
ec271391
...
...
@@ -4,6 +4,7 @@ define(function(require) {
var
List
=
require
(
'
../../data/List
'
);
var
modelUtil
=
require
(
'
../../util/model
'
);
var
completeDimensions
=
require
(
'
../../data/helper/completeDimensions
'
);
require
(
'
../../echarts
'
).
extendSeriesModel
({
...
...
@@ -22,7 +23,8 @@ define(function(require) {
},
getInitialData
:
function
(
option
,
ecModel
)
{
var
list
=
new
List
([
'
value
'
],
this
);
var
dimensions
=
completeDimensions
([
'
value
'
],
option
.
data
);
var
list
=
new
List
(
dimensions
,
this
);
list
.
initData
(
option
.
data
);
return
list
;
},
...
...
src/chart/funnel/FunnelView.js
浏览文件 @
ec271391
...
...
@@ -41,7 +41,7 @@ define(function (require) {
function
getLabelStyle
(
data
,
idx
,
state
,
labelModel
)
{
var
textStyleModel
=
labelModel
.
getModel
(
'
textStyle
'
);
var
position
=
labelModel
.
get
(
'
position
'
);
var
isLabelInside
=
position
===
'
inside
'
||
position
===
'
inner
'
;
var
isLabelInside
=
position
===
'
inside
'
||
position
===
'
inner
'
||
position
===
'
center
'
;
return
{
fill
:
textStyleModel
.
getTextColor
()
||
(
isLabelInside
?
'
#fff
'
:
data
.
getItemVisual
(
idx
,
'
color
'
)),
...
...
src/chart/gauge/GaugeSeries.js
浏览文件 @
ec271391
...
...
@@ -40,7 +40,7 @@ define(function (require) {
// 默认显示,属性show控制显示与否
show
:
true
,
lineStyle
:
{
// 属性lineStyle控制线条样式
color
:
[[
0.2
,
'
#91c7ae
'
],
[
0.8
,
'
#63869e
'
],
[
1
,
'
#c23531
'
]],
color
:
[[
0.2
,
'
#91c7ae
'
],
[
0.8
,
'
#63869e
'
],
[
1
,
'
#c23531
'
]],
width
:
30
}
},
...
...
@@ -72,7 +72,7 @@ define(function (require) {
type
:
'
solid
'
}
},
axisLabel
:
{
// 坐标轴文本标签,详见axis.axisLabel
axisLabel
:
{
show
:
true
,
// formatter: null,
textStyle
:
{
// 其余属性默认使用全局文本样式,详见TEXTSTYLE
...
...
src/chart/graph/GraphSeries.js
浏览文件 @
ec271391
...
...
@@ -33,7 +33,20 @@ define(function (require) {
var
nodes
=
option
.
data
||
option
.
nodes
;
if
(
nodes
&&
edges
)
{
var
graph
=
createGraphFromNodeEdge
(
nodes
,
edges
,
this
,
true
);
return
graph
.
data
;
var
list
=
graph
.
data
;
var
self
=
this
;
// Overwrite list.getItemModel to
list
.
wrapMethod
(
'
getItemModel
'
,
function
(
model
)
{
var
categoriesModels
=
self
.
_categoriesModels
;
var
categoryIdx
=
model
.
getShallow
(
'
category
'
);
var
categoryModel
=
categoriesModels
[
categoryIdx
];
if
(
categoryModel
)
{
categoryModel
.
parentModel
=
model
.
parentModel
;
model
.
parentModel
=
categoryModel
;
}
return
model
;
});
return
list
;
}
},
...
...
@@ -66,12 +79,18 @@ define(function (require) {
_updateCategoriesData
:
function
()
{
var
categories
=
zrUtil
.
map
(
this
.
option
.
categories
||
[],
function
(
category
)
{
// Data must has value
return
category
.
value
!=
null
?
category
:
zrUtil
.
extend
({
value
:
0
},
category
);
return
category
.
value
!=
null
?
category
:
zrUtil
.
extend
({
value
:
0
},
category
);
});
var
categoriesData
=
new
List
([
'
value
'
],
this
);
categoriesData
.
initData
(
categories
);
this
.
_categoriesData
=
categoriesData
;
this
.
_categoriesModels
=
categoriesData
.
mapArray
(
function
(
idx
)
{
return
categoriesData
.
getItemModel
(
idx
,
true
);
});
},
/**
...
...
@@ -142,7 +161,7 @@ define(function (require) {
nodeScaleRatio
:
0.6
,
// Line width scale ratio in roam
edgeScaleRatio
:
0.1
,
//
edgeScaleRatio: 0.1,
// categories: [],
...
...
src/chart/pie/PieSeries.js
浏览文件 @
ec271391
...
...
@@ -5,6 +5,7 @@ define(function(require) {
var
List
=
require
(
'
../../data/List
'
);
var
zrUtil
=
require
(
'
zrender/core/util
'
);
var
modelUtil
=
require
(
'
../../util/model
'
);
var
completeDimensions
=
require
(
'
../../data/helper/completeDimensions
'
);
var
dataSelectableMixin
=
require
(
'
../helper/dataSelectableMixin
'
);
...
...
@@ -34,7 +35,8 @@ define(function(require) {
},
getInitialData
:
function
(
option
,
ecModel
)
{
var
list
=
new
List
([
'
value
'
],
this
);
var
dimensions
=
completeDimensions
([
'
value
'
],
option
.
data
);
var
list
=
new
List
(
dimensions
,
this
);
list
.
initData
(
option
.
data
);
return
list
;
},
...
...
src/component/toolbox/feature/DataView.js
浏览文件 @
ec271391
...
...
@@ -195,10 +195,27 @@ define(function (require) {
var
data
=
[];
for
(
var
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
var
items
=
trim
(
lines
[
i
]).
split
(
itemSplitRegex
);
data
[
i
]
=
[];
var
name
=
''
;
var
value
;
var
hasName
=
false
;
if
(
isNaN
(
items
[
0
]))
{
// First item is name
hasName
=
true
;
name
=
items
[
0
];
items
=
items
.
slice
(
1
);
data
[
i
]
=
{
name
:
name
,
value
:
[]
};
value
=
data
[
i
].
value
;
}
else
{
value
=
data
[
i
]
=
[];
}
for
(
var
j
=
0
;
j
<
items
.
length
;
j
++
)
{
var
item
=
items
[
j
];
data
[
i
].
push
(
item
);
value
.
push
(
+
items
[
j
]);
}
if
(
value
.
length
===
1
)
{
hasName
?
(
data
[
i
].
value
=
value
[
0
])
:
(
data
[
i
]
=
value
[
0
]);
}
}
...
...
@@ -384,6 +401,10 @@ define(function (require) {
return
zrUtil
.
map
(
newData
,
function
(
newVal
,
idx
)
{
var
original
=
originalData
&&
originalData
[
idx
];
if
(
zrUtil
.
isObject
(
original
)
&&
!
zrUtil
.
isArray
(
original
))
{
if
(
zrUtil
.
isObject
(
newVal
)
&&
!
zrUtil
.
isArray
(
newVal
))
{
newVal
=
newVal
.
value
;
}
// Original data has option
return
zrUtil
.
defaults
({
value
:
newVal
},
original
);
...
...
src/data/List.js
浏览文件 @
ec271391
...
...
@@ -31,8 +31,8 @@ define(function (require) {
'
stackedOn
'
,
'
_nameList
'
,
'
_idList
'
,
'
_rawData
'
];
var
transferImmuProperties
=
function
(
a
,
b
)
{
zrUtil
.
each
(
IMMUTABLE_PROPERTIES
,
function
(
propName
)
{
var
transferImmuProperties
=
function
(
a
,
b
,
wrappedMethod
)
{
zrUtil
.
each
(
IMMUTABLE_PROPERTIES
.
concat
(
wrappedMethod
||
[])
,
function
(
propName
)
{
if
(
b
.
hasOwnProperty
(
propName
))
{
a
[
propName
]
=
b
[
propName
];
}
...
...
@@ -275,10 +275,6 @@ define(function (require) {
this
.
_idList
=
idList
;
};
listProto
.
getDimValue
=
function
()
{
};
/**
* @return {number}
*/
...
...
@@ -676,7 +672,7 @@ define(function (require) {
var
indices
=
list
.
indices
=
this
.
indices
;
// FIXME If needs stackedOn, value may already been stacked
transferImmuProperties
(
list
,
this
);
transferImmuProperties
(
list
,
this
,
this
.
_wrappedMethods
);
var
storage
=
list
.
_storage
=
{};
var
thisStorage
=
this
.
_storage
;
...
...
@@ -745,11 +741,11 @@ define(function (require) {
}
else
{
model
=
temporaryModel
;
}
// FIXME If return null when idx not exists
model
.
option
=
this
.
_rawData
[
idx
];
model
.
parentModel
=
hostModel
;
model
.
ecModel
=
hostModel
.
ecModel
;
}
return
model
;
};
...
...
@@ -922,12 +918,30 @@ define(function (require) {
// FIXME
list
.
_storage
=
this
.
_storage
;
transferImmuProperties
(
list
,
this
);
transferImmuProperties
(
list
,
this
,
this
.
_wrappedMethods
);
list
.
indices
=
this
.
indices
.
slice
();
return
list
;
};
/**
* Wrap some method to add more feature
* @param {string} methodName
* @param {Function} injectFunction
*/
listProto
.
wrapMethod
=
function
(
methodName
,
injectFunction
)
{
var
originalMethod
=
this
[
methodName
];
if
(
typeof
originalMethod
!==
'
function
'
)
{
return
;
}
this
.
_wrappedMethods
=
this
.
_wrappedMethods
||
[];
this
.
_wrappedMethods
.
push
(
methodName
);
this
[
methodName
]
=
function
()
{
var
res
=
originalMethod
.
apply
(
this
,
arguments
);
return
injectFunction
.
call
(
this
,
res
);
};
};
return
List
;
});
\ No newline at end of file
src/data/Tree.js
浏览文件 @
ec271391
...
...
@@ -307,7 +307,7 @@ define(function(require) {
/**
* @private
* @readOnly
* @type {
Array.<
module:echarts/model/Model}
* @type {module:echarts/model/Model}
*/
this
.
hostModel
=
hostModel
;
...
...
src/layout/barGrid.js
浏览文件 @
ec271391
...
...
@@ -193,7 +193,8 @@ define(function(require) {
height
=
coord
[
1
]
-
lastCoord
;
if
(
Math
.
abs
(
height
)
<
barMinHeight
)
{
height
=
(
height
<
0
?
-
1
:
1
)
*
barMinHeight
;
// Include zero to has a positive bar
height
=
(
height
<=
0
?
-
1
:
1
)
*
barMinHeight
;
}
lastStackCoords
[
stackId
][
idx
][
sign
]
+=
height
;
}
...
...
src/model/globalDefault.js
浏览文件 @
ec271391
...
...
@@ -21,7 +21,7 @@ define(function () {
// 主题,主题
textStyle
:
{
// color: '#000',
decoration
:
'
none
'
,
//
decoration: 'none',
// PENDING
fontFamily
:
platform
.
match
(
/^Win/
)
?
'
Microsoft YaHei
'
:
'
sans-serif
'
,
// fontFamily: 'Arial, Verdana, sans-serif',
...
...
src/scale/Interval.js
浏览文件 @
ec271391
...
...
@@ -162,18 +162,7 @@ define(function (require) {
* @param {boolean} [fixMax=false]
*/
niceExtent
:
function
(
approxTickNum
,
fixMin
,
fixMax
)
{
this
.
niceTicks
(
approxTickNum
,
fixMin
,
fixMax
);
var
extent
=
this
.
_extent
;
var
interval
=
this
.
_interval
;
if
(
!
fixMin
)
{
extent
[
0
]
=
numberUtil
.
round
(
mathFloor
(
extent
[
0
]
/
interval
)
*
interval
);
}
if
(
!
fixMax
)
{
extent
[
1
]
=
numberUtil
.
round
(
mathCeil
(
extent
[
1
]
/
interval
)
*
interval
);
}
// If extent start and end are same, expand them
if
(
extent
[
0
]
===
extent
[
1
])
{
// Expand extent
...
...
@@ -187,6 +176,19 @@ define(function (require) {
extent
[
0
]
=
-
1
;
this
.
_niceExtent
=
[
-
1
,
1
];
this
.
_interval
=
0.5
;
return
;
}
this
.
niceTicks
(
approxTickNum
,
fixMin
,
fixMax
);
// var extent = this._extent;
var
interval
=
this
.
_interval
;
if
(
!
fixMin
)
{
extent
[
0
]
=
numberUtil
.
round
(
mathFloor
(
extent
[
0
]
/
interval
)
*
interval
);
}
if
(
!
fixMax
)
{
extent
[
1
]
=
numberUtil
.
round
(
mathCeil
(
extent
[
1
]
/
interval
)
*
interval
);
}
}
});
...
...
src/visual/dataColor.js
浏览文件 @
ec271391
...
...
@@ -2,9 +2,8 @@
define
(
function
(
require
)
{
return
function
(
seriesType
,
ecModel
)
{
var
colorList
=
ecModel
.
get
(
'
color
'
);
ecModel
.
eachSeriesByType
(
seriesType
,
function
(
seriesModel
)
{
var
colorList
=
seriesModel
.
get
(
'
color
'
);
var
dataAll
=
seriesModel
.
getRawData
();
if
(
!
ecModel
.
isSeriesFiltered
(
seriesModel
))
{
var
data
=
seriesModel
.
getData
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录