Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
3729431b
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 搜索 >>
提交
3729431b
编写于
10月 16, 2020
作者:
Y
yufeng04
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:the logic of code in data.update
上级
0ce5122a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
21 deletion
+16
-21
src/chart/gauge/GaugeView.ts
src/chart/gauge/GaugeView.ts
+16
-21
未找到文件。
src/chart/gauge/GaugeView.ts
浏览文件 @
3729431b
...
@@ -432,39 +432,33 @@ class GaugeView extends ChartView {
...
@@ -432,39 +432,33 @@ class GaugeView extends ChartView {
.
update
(
function
(
newIdx
,
oldIdx
)
{
.
update
(
function
(
newIdx
,
oldIdx
)
{
if
(
showPointer
)
{
if
(
showPointer
)
{
const
previousPointer
=
oldData
.
getItemGraphicEl
(
oldIdx
)
as
PointerPath
;
const
previousPointer
=
oldData
.
getItemGraphicEl
(
oldIdx
)
as
PointerPath
;
if
(
previousPointer
)
{
const
previousRotate
=
previousPointer
?
previousPointer
.
rotation
:
startAngle
;
const
previousRotate
=
previousPointer
.
rotation
;
const
pointer
=
createPointer
(
newIdx
,
previousRotate
);
group
.
remove
(
previousPointer
);
const
pointer
=
createPointer
(
newIdx
,
previousRotate
);
pointer
.
rotation
=
previousRotate
;
pointer
.
rotation
=
previousRotate
;
graphic
.
updateProps
(
pointer
,
{
graphic
.
updateProps
(
pointer
,
{
rotation
:
-
(
rotation
:
-
(
linearMap
(
data
.
get
(
valueDim
,
newIdx
)
as
number
,
valueExtent
,
angleExtent
,
true
)
linearMap
(
data
.
get
(
valueDim
,
newIdx
)
as
number
,
valueExtent
,
angleExtent
,
true
)
+
Math
.
PI
/
2
+
Math
.
PI
/
2
)
)
},
seriesModel
);
},
seriesModel
);
group
.
add
(
pointer
);
group
.
add
(
pointer
);
data
.
setItemGraphicEl
(
newIdx
,
pointer
);
data
.
setItemGraphicEl
(
newIdx
,
pointer
);
}
}
}
if
(
showProgress
)
{
if
(
showProgress
)
{
const
previousProgress
=
oldProgressData
[
oldIdx
];
const
previousProgress
=
oldProgressData
[
oldIdx
];
if
(
previousProgress
)
{
const
previousEndAngle
=
previousProgress
?
previousProgress
.
shape
.
endAngle
:
startAngle
;
const
previousEndAngle
=
previousProgress
.
shape
.
endAngle
;
const
progress
=
createProgress
(
newIdx
,
previousEndAngle
)
as
graphic
.
Sector
;
group
.
remove
(
previousProgress
);
const
isClip
=
progressModel
.
get
(
'
clip
'
);
const
progress
=
createProgress
(
newIdx
,
previousEndAngle
)
as
graphic
.
Sector
;
graphic
.
updateProps
(
progress
,
{
const
isClip
=
progressModel
.
get
(
'
clip
'
);
shape
:
{
graphic
.
updateProps
(
progress
,
{
endAngle
:
linearMap
(
shape
:
{
data
.
get
(
valueDim
,
newIdx
)
as
number
,
valueExtent
,
angleExtent
,
isClip
endAngle
:
linearMap
(
)
data
.
get
(
valueDim
,
newIdx
)
as
number
,
valueExtent
,
angleExtent
,
isClip
}
)
},
seriesModel
);
}
group
.
add
(
progress
);
},
seriesModel
);
progressList
[
newIdx
]
=
progress
;
group
.
add
(
progress
);
progressList
[
newIdx
]
=
progress
;
}
}
}
})
})
.
execute
();
.
execute
();
...
@@ -491,6 +485,7 @@ class GaugeView extends ChartView {
...
@@ -491,6 +485,7 @@ class GaugeView extends ChartView {
const
progress
=
progressList
[
idx
];
const
progress
=
progressList
[
idx
];
progress
.
useStyle
(
data
.
getItemVisual
(
idx
,
'
style
'
));
progress
.
useStyle
(
data
.
getItemVisual
(
idx
,
'
style
'
));
progress
.
setStyle
(
itemModel
.
getModel
([
'
progress
'
,
'
itemStyle
'
]).
getItemStyle
());
progress
.
setStyle
(
itemModel
.
getModel
([
'
progress
'
,
'
itemStyle
'
]).
getItemStyle
());
(
progress
as
ECElement
).
z2EmphasisLift
=
0
;
setStatesStylesFromModel
(
progress
,
itemModel
);
setStatesStylesFromModel
(
progress
,
itemModel
);
enableHoverEmphasis
(
progress
,
emphasisModel
.
get
(
'
focus
'
),
emphasisModel
.
get
(
'
blurScope
'
));
enableHoverEmphasis
(
progress
,
emphasisModel
.
get
(
'
focus
'
),
emphasisModel
.
get
(
'
blurScope
'
));
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录