Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
fcf80fef
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,体验更适合开发者的 AI 搜索 >>
提交
fcf80fef
编写于
9月 18, 2019
作者:
S
sushuang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(lint): fix code style by eslint.
上级
ae7fbad7
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
64 addition
and
60 deletion
+64
-60
extension-src/.eslintrc.yaml
extension-src/.eslintrc.yaml
+2
-1
extension-src/bmap/BMapView.js
extension-src/bmap/BMapView.js
+1
-1
extension-src/dataTool/gexf.js
extension-src/dataTool/gexf.js
+9
-8
src/.eslintrc.yaml
src/.eslintrc.yaml
+2
-1
src/chart/funnel/funnelLayout.js
src/chart/funnel/funnelLayout.js
+6
-6
src/chart/line/LineView.js
src/chart/line/LineView.js
+6
-6
src/chart/pie/PieView.js
src/chart/pie/PieView.js
+2
-1
src/chart/sunburst/SunburstPiece.js
src/chart/sunburst/SunburstPiece.js
+2
-1
src/chart/sunburst/sunburstLayout.js
src/chart/sunburst/sunburstLayout.js
+7
-7
src/component/axisPointer.js
src/component/axisPointer.js
+2
-2
src/component/axisPointer/BaseAxisPointer.js
src/component/axisPointer/BaseAxisPointer.js
+2
-2
src/component/dataZoom/DataZoomModel.js
src/component/dataZoom/DataZoomModel.js
+3
-3
src/component/graphic.js
src/component/graphic.js
+1
-1
src/component/toolbox/ToolboxView.js
src/component/toolbox/ToolboxView.js
+2
-1
src/coord/single/singleAxisHelper.js
src/coord/single/singleAxisHelper.js
+2
-3
src/data/helper/completeDimensions.js
src/data/helper/completeDimensions.js
+2
-2
src/layout/barPolar.js
src/layout/barPolar.js
+1
-2
src/model/mixin/lineStyle.js
src/model/mixin/lineStyle.js
+8
-8
src/view/Component.js
src/view/Component.js
+4
-4
未找到文件。
extension-src/.eslintrc.yaml
浏览文件 @
fcf80fef
parserOptions
:
ecmaVersion
:
3
# If using ES Module, ecmaVersion have to be set as `2015`.
ecmaVersion
:
2015
sourceType
:
"
module"
env
:
browser
:
true
...
...
extension-src/bmap/BMapView.js
浏览文件 @
fcf80fef
...
...
@@ -104,7 +104,7 @@ export default echarts.extendComponentView({
/* map 3.0 */
var
originalStyle2
=
bMapModel
.
__mapStyle2
;
var
newMapStyle2
=
bMapModel
.
get
(
'
mapStyleV2
'
)
||
{};
var
newMapStyle2
=
bMapModel
.
get
(
'
mapStyleV2
'
)
||
{};
// FIXME, Not use JSON methods
var
mapStyleStr2
=
JSON
.
stringify
(
newMapStyle2
);
if
(
JSON
.
stringify
(
originalStyle2
)
!==
mapStyleStr2
)
{
...
...
extension-src/dataTool/gexf.js
浏览文件 @
fcf80fef
...
...
@@ -99,7 +99,7 @@ function parseNodes(parent, attributesMap) {
// z
}
if
(
vizColorDom
)
{
node
.
itemStyle
.
normal
.
color
=
'
rgb(
'
+
[
node
.
itemStyle
.
normal
.
color
=
'
rgb(
'
+
[
getAttr
(
vizColorDom
,
'
r
'
)
|
0
,
getAttr
(
vizColorDom
,
'
g
'
)
|
0
,
getAttr
(
vizColorDom
,
'
b
'
)
|
0
...
...
@@ -130,7 +130,7 @@ function parseNodes(parent, attributesMap) {
attValue
=
parseFloat
(
attValue
);
break
;
case
'
boolean
'
:
attValue
=
attValue
.
toLowerCase
()
==
'
true
'
;
attValue
=
attValue
.
toLowerCase
()
==
=
'
true
'
;
break
;
default
:
}
...
...
@@ -189,16 +189,17 @@ function getAttr(el, attrName) {
return
el
.
getAttribute
(
attrName
);
}
function
getChildByTagName
(
parent
,
tagName
)
{
function
getChildByTagName
(
parent
,
tagName
)
{
var
node
=
parent
.
firstChild
;
while
(
node
)
{
if
(
node
.
nodeType
!=
1
||
node
.
nodeName
.
toLowerCase
()
!
=
tagName
.
toLowerCase
()
node
.
nodeType
!=
=
1
||
node
.
nodeName
.
toLowerCase
()
!=
=
tagName
.
toLowerCase
()
)
{
node
=
node
.
nextSibling
;
}
else
{
}
else
{
return
node
;
}
}
...
...
@@ -206,11 +207,11 @@ function getChildByTagName (parent, tagName) {
return
null
;
}
function
getChildrenByTagName
(
parent
,
tagName
)
{
function
getChildrenByTagName
(
parent
,
tagName
)
{
var
node
=
parent
.
firstChild
;
var
children
=
[];
while
(
node
)
{
if
(
node
.
nodeName
.
toLowerCase
()
==
tagName
.
toLowerCase
())
{
if
(
node
.
nodeName
.
toLowerCase
()
==
=
tagName
.
toLowerCase
())
{
children
.
push
(
node
);
}
node
=
node
.
nextSibling
;
...
...
src/.eslintrc.yaml
浏览文件 @
fcf80fef
parserOptions
:
ecmaVersion
:
3
# If using ES Module, ecmaVersion have to be set as `2015`.
ecmaVersion
:
2015
sourceType
:
"
module"
env
:
browser
:
true
...
...
src/chart/funnel/funnelLayout.js
浏览文件 @
fcf80fef
...
...
@@ -104,7 +104,7 @@ function labelLayout(data) {
x2
=
x1
-
labelLineLen
;
textX
=
x2
-
5
;
textAlign
=
'
right
'
;
}
}
else
if
(
labelPosition
===
'
right
'
)
{
// Right side
x1
=
(
points
[
1
][
0
]
+
points
[
2
][
0
])
/
2
;
...
...
@@ -112,7 +112,7 @@ function labelLayout(data) {
x2
=
x1
+
labelLineLen
;
textX
=
x2
+
5
;
textAlign
=
'
left
'
;
}
}
else
if
(
labelPosition
===
'
rightTop
'
)
{
// RightTop side
x1
=
points
[
1
][
0
];
...
...
@@ -120,7 +120,7 @@ function labelLayout(data) {
x2
=
x1
+
labelLineLen
;
textX
=
x2
+
5
;
textAlign
=
'
top
'
;
}
}
else
if
(
labelPosition
===
'
rightBottom
'
)
{
// RightBottom side
x1
=
points
[
2
][
0
];
...
...
@@ -128,7 +128,7 @@ function labelLayout(data) {
x2
=
x1
+
labelLineLen
;
textX
=
x2
+
5
;
textAlign
=
'
bottom
'
;
}
}
else
if
(
labelPosition
===
'
leftTop
'
)
{
// LeftTop side
x1
=
points
[
0
][
0
];
...
...
@@ -136,7 +136,7 @@ function labelLayout(data) {
x2
=
x1
-
labelLineLen
;
textX
=
x2
-
5
;
textAlign
=
'
right
'
;
}
}
else
if
(
labelPosition
===
'
leftBottom
'
)
{
// LeftBottom side
x1
=
points
[
3
][
0
];
...
...
@@ -144,7 +144,7 @@ function labelLayout(data) {
x2
=
x1
-
labelLineLen
;
textX
=
x2
-
5
;
textAlign
=
'
right
'
;
}
}
else
{
// Right side
x1
=
(
points
[
1
][
0
]
+
points
[
2
][
0
])
/
2
;
...
...
src/chart/line/LineView.js
浏览文件 @
fcf80fef
...
...
@@ -787,11 +787,11 @@ export default ChartView.extend({
}
});
this
.
_polyline
=
this
.
_polygon
=
this
.
_coordSys
=
this
.
_points
=
this
.
_stackedOnPoints
=
this
.
_data
=
null
;
this
.
_polyline
=
this
.
_polygon
=
this
.
_coordSys
=
this
.
_points
=
this
.
_stackedOnPoints
=
this
.
_data
=
null
;
}
});
\ No newline at end of file
src/chart/pie/PieView.js
浏览文件 @
fcf80fef
...
...
@@ -141,7 +141,8 @@ piePieceProto.updateData = function (data, idx, firstCreate) {
if
(
animationTypeUpdate
===
'
expansion
'
)
{
// Sectors are set to be target shape and an overlaying clipPath is used for animation
sector
.
setShape
(
sectorShape
);
}
else
{
}
else
{
// Transition animation from the old shape
graphic
.
updateProps
(
sector
,
{
shape
:
sectorShape
...
...
src/chart/sunburst/SunburstPiece.js
浏览文件 @
fcf80fef
...
...
@@ -292,7 +292,8 @@ SunburstPieceProto._updateLabel = function (seriesModel, visualColor, state) {
else
if
(
rotate
<
-
Math
.
PI
/
2
)
{
rotate
+=
Math
.
PI
;
}
}
else
if
(
typeof
rotateType
===
'
number
'
)
{
}
else
if
(
typeof
rotateType
===
'
number
'
)
{
rotate
=
rotateType
*
Math
.
PI
/
180
;
}
label
.
attr
(
'
rotation
'
,
rotate
);
...
...
src/chart/sunburst/sunburstLayout.js
浏览文件 @
fcf80fef
...
...
@@ -21,7 +21,7 @@
import
{
parsePercent
}
from
'
../../util/number
'
;
import
*
as
zrUtil
from
'
zrender/src/core/util
'
;
var
PI2
=
Math
.
PI
*
2
;
//
var PI2 = Math.PI * 2;
var
RADIAN
=
Math
.
PI
/
180
;
export
default
function
(
seriesType
,
ecModel
,
api
,
payload
)
{
...
...
@@ -74,8 +74,8 @@ export default function (seriesType, ecModel, api, payload) {
var
stillShowZeroSum
=
seriesModel
.
get
(
'
stillShowZeroSum
'
);
// In the case some sector angle is smaller than minAngle
var
restAngle
=
PI2
;
var
valueSumLargerThanMinAngle
=
0
;
//
var restAngle = PI2;
//
var valueSumLargerThanMinAngle = 0;
var
dir
=
clockwise
?
1
:
-
1
;
...
...
@@ -99,11 +99,11 @@ export default function (seriesType, ecModel, api, payload) {
?
unitRadian
:
(
value
*
unitRadian
);
if
(
angle
<
minAngle
)
{
angle
=
minAngle
;
restAngle
-=
minAngle
;
}
else
{
valueSumLargerThanMinAngle
+=
value
;
// restAngle -= minAngle;
}
// else {
// valueSumLargerThanMinAngle += value;
// }
endAngle
=
startAngle
+
dir
*
angle
;
...
...
src/component/axisPointer.js
浏览文件 @
fcf80fef
...
...
@@ -51,8 +51,8 @@ echarts.registerPreprocessor(function (option) {
echarts
.
registerProcessor
(
echarts
.
PRIORITY
.
PROCESSOR
.
STATISTIC
,
function
(
ecModel
,
api
)
{
// Build axisPointerModel, mergin tooltip.axisPointer model for each axis.
// allAxesInfo should be updated when setOption performed.
ecModel
.
getComponent
(
'
axisPointer
'
).
coordSysAxesInfo
=
axisPointerModelHelper
.
collect
(
ecModel
,
api
);
ecModel
.
getComponent
(
'
axisPointer
'
).
coordSysAxesInfo
=
axisPointerModelHelper
.
collect
(
ecModel
,
api
);
});
// Broadcast to all views.
...
...
src/component/axisPointer/BaseAxisPointer.js
浏览文件 @
fcf80fef
...
...
@@ -128,8 +128,8 @@ BaseAxisPointer.prototype = {
}
this
.
_lastGraphicKey
=
graphicKey
;
var
moveAnimation
=
this
.
_moveAnimation
=
this
.
determineAnimation
(
axisModel
,
axisPointerModel
);
var
moveAnimation
=
this
.
_moveAnimation
=
this
.
determineAnimation
(
axisModel
,
axisPointerModel
);
if
(
!
group
)
{
group
=
this
.
_group
=
new
graphic
.
Group
();
...
...
src/component/dataZoom/DataZoomModel.js
浏览文件 @
fcf80fef
...
...
@@ -382,9 +382,9 @@ var DataZoomModel = echarts.extendComponentModel({
}
if
(
this
.
_autoThrottle
)
{
var
globalOption
=
this
.
ecModel
.
option
;
this
.
option
.
throttle
=
(
globalOption
.
animation
&&
globalOption
.
animationDurationUpdate
>
0
)
?
100
:
20
;
this
.
option
.
throttle
=
(
globalOption
.
animation
&&
globalOption
.
animationDurationUpdate
>
0
)
?
100
:
20
;
}
},
...
...
src/component/graphic.js
浏览文件 @
fcf80fef
...
...
@@ -402,7 +402,7 @@ echarts.extendComponentView({
};
// PENDING
// Currently, when `bounding: 'all'`, the union bounding rect of the group
// Currently, when `bounding: 'all'`, the union bounding rect of the group
// does not include the rect of [0, 0, group.width, group.height], which
// is probably weird for users. Should we make a break change for it?
layoutUtil
.
positionElement
(
...
...
src/component/toolbox/ToolboxView.js
浏览文件 @
fcf80fef
...
...
@@ -185,7 +185,8 @@ export default echarts.extendComponentView({
path
.
setStyle
({
text
:
titles
[
iconName
],
textPosition
:
iconStyleEmphasisModel
.
get
(
'
textPosition
'
)
||
'
bottom
'
,
textFill
:
iconStyleEmphasisModel
.
get
(
'
textFill
'
)
||
hoverStyle
.
fill
||
hoverStyle
.
stroke
||
'
#000
'
,
textFill
:
iconStyleEmphasisModel
.
get
(
'
textFill
'
)
||
hoverStyle
.
fill
||
hoverStyle
.
stroke
||
'
#000
'
,
textAlign
:
iconStyleEmphasisModel
.
get
(
'
textAlign
'
)
||
'
center
'
,
textBackgroundColor
:
iconStyleEmphasisModel
.
get
(
'
textBackgroundColor
'
),
textBorderRadius
:
iconStyleEmphasisModel
.
get
(
'
textBorderRadius
'
),
...
...
src/coord/single/singleAxisHelper.js
浏览文件 @
fcf80fef
...
...
@@ -57,9 +57,8 @@ export function layout(axisModel, opt) {
var
directionMap
=
{
top
:
-
1
,
bottom
:
1
,
right
:
1
,
left
:
-
1
};
layout
.
labelDirection
=
layout
.
tickDirection
=
layout
.
nameDirection
=
directionMap
[
axisPosition
];
layout
.
labelDirection
=
layout
.
tickDirection
=
layout
.
nameDirection
=
directionMap
[
axisPosition
];
if
(
axisModel
.
get
(
'
axisTick.inside
'
))
{
layout
.
tickDirection
=
-
layout
.
tickDirection
;
...
...
src/data/helper/completeDimensions.js
浏览文件 @
fcf80fef
...
...
@@ -153,8 +153,8 @@ function completeDimensions(sysDims, source, opt) {
// `coordDimIndex` should not be set directly.
sysDimItemDimsDef
=
sysDimItem
.
dimsDef
;
sysDimItemOtherDims
=
sysDimItem
.
otherDims
;
sysDimItem
.
name
=
sysDimItem
.
coordDim
=
sysDimItem
.
coordDimIndex
=
sysDimItem
.
dimsDef
=
sysDimItem
.
otherDims
=
null
;
sysDimItem
.
name
=
sysDimItem
.
coordDim
=
sysDimItem
.
coordDimIndex
=
sysDimItem
.
dimsDef
=
sysDimItem
.
otherDims
=
null
;
}
var
dataDims
=
encodeDef
.
get
(
coordDim
);
...
...
src/layout/barPolar.js
浏览文件 @
fcf80fef
...
...
@@ -63,8 +63,7 @@ function barLayoutPolar(seriesType, ecModel, api) {
var
axisKey
=
getAxisKey
(
polar
,
baseAxis
);
var
stackId
=
getSeriesStackId
(
seriesModel
);
var
columnLayoutInfo
=
barWidthAndOffset
[
axisKey
][
stackId
];
var
columnLayoutInfo
=
barWidthAndOffset
[
axisKey
][
stackId
];
var
columnOffset
=
columnLayoutInfo
.
offset
;
var
columnWidth
=
columnLayoutInfo
.
width
;
var
valueAxis
=
polar
.
getOtherAxis
(
baseAxis
);
...
...
src/model/mixin/lineStyle.js
浏览文件 @
fcf80fef
...
...
@@ -34,7 +34,7 @@ var getLineStyle = makeStyleMapper(
export
default
{
getLineStyle
:
function
(
excludes
)
{
var
style
=
getLineStyle
(
this
,
excludes
);
// Always set lineDash whether dashed, otherwise we can not
// Always set lineDash whether dashed, otherwise we can not
// erase the previous style when assigning to el.style.
style
.
lineDash
=
this
.
getLineDash
(
style
.
lineWidth
);
return
style
;
...
...
@@ -47,15 +47,15 @@ export default {
var
lineType
=
this
.
get
(
'
type
'
);
var
dotSize
=
Math
.
max
(
lineWidth
,
2
);
var
dashSize
=
lineWidth
*
4
;
return
(
lineType
===
'
solid
'
||
lineType
==
null
)
// Use `false` but not `null` for the solid line here, because `null` might be
// ignored when assigning to `el.style`. e.g., when setting `lineStyle.type` as
// `'dashed'` and `emphasis.lineStyle.type` as `'solid'` in graph series, the
// `lineDash` gotten form the latter one is not able to erase that from the former
return
(
lineType
===
'
solid
'
||
lineType
==
null
)
// Use `false` but not `null` for the solid line here, because `null` might be
// ignored when assigning to `el.style`. e.g., when setting `lineStyle.type` as
// `'dashed'` and `emphasis.lineStyle.type` as `'solid'` in graph series, the
// `lineDash` gotten form the latter one is not able to erase that from the former
// one if using `null` here according to the emhpsis strategy in `util/graphic.js`.
?
false
:
lineType
===
'
dashed
'
?
[
dashSize
,
dashSize
]
:
lineType
===
'
dashed
'
?
[
dashSize
,
dashSize
]
:
[
dotSize
,
dotSize
];
}
};
\ No newline at end of file
src/view/Component.js
浏览文件 @
fcf80fef
...
...
@@ -57,10 +57,10 @@ Component.prototype = {
};
var
componentProto
=
Component
.
prototype
;
componentProto
.
updateView
=
componentProto
.
updateLayout
=
componentProto
.
updateVisual
=
function
(
seriesModel
,
ecModel
,
api
,
payload
)
{
componentProto
.
updateView
=
componentProto
.
updateLayout
=
componentProto
.
updateVisual
=
function
(
seriesModel
,
ecModel
,
api
,
payload
)
{
// Do nothing;
};
// Enable Component.extend.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录