Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
73d6d376
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 搜索 >>
提交
73d6d376
编写于
7月 16, 2020
作者:
P
pissang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ts: fix types
上级
34a949f1
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
40 addition
and
17 deletion
+40
-17
src/chart/bar/BaseBarSeries.ts
src/chart/bar/BaseBarSeries.ts
+3
-2
src/chart/sankey/SankeySeries.ts
src/chart/sankey/SankeySeries.ts
+10
-3
src/chart/sunburst/SunburstSeries.ts
src/chart/sunburst/SunburstSeries.ts
+8
-2
src/chart/treemap/TreemapSeries.ts
src/chart/treemap/TreemapSeries.ts
+9
-3
src/component/helper/selectableMixin.ts
src/component/helper/selectableMixin.ts
+3
-3
src/preprocessor/backwardCompat.ts
src/preprocessor/backwardCompat.ts
+3
-1
src/util/types.ts
src/util/types.ts
+2
-1
test/hoverFocus2.html
test/hoverFocus2.html
+2
-2
未找到文件。
src/chart/bar/BaseBarSeries.ts
浏览文件 @
73d6d376
...
...
@@ -30,7 +30,8 @@ import Cartesian2D from '../../coord/cartesian/Cartesian2D';
import
List
from
'
../../data/List
'
;
export
interface
BaseBarSeriesOption
<
StateOption
,
ExtraStateOption
>
extends
SeriesOption
<
StateOption
,
ExtraStateOption
>
,
export
interface
BaseBarSeriesOption
<
StateOption
,
ExtraStateOption
=
unknown
>
extends
SeriesOption
<
StateOption
,
ExtraStateOption
>
,
SeriesOnCartesianOptionMixin
,
SeriesOnPolarOptionMixin
{
...
...
@@ -70,7 +71,7 @@ export interface BaseBarSeriesOption<StateOption, ExtraStateOption> extends Seri
largeThreshold
?:
number
}
class
BaseBarSeriesModel
<
Opts
extends
BaseBarSeriesOption
<
unknown
,
unknown
>
=
BaseBarSeriesOption
<
unknown
,
unknown
>>
class
BaseBarSeriesModel
<
Opts
extends
BaseBarSeriesOption
<
unknown
>
=
BaseBarSeriesOption
<
unknown
>>
extends
SeriesModel
<
Opts
>
{
static
type
=
'
series.__base_bar__
'
;
...
...
src/chart/sankey/SankeySeries.ts
浏览文件 @
73d6d376
...
...
@@ -56,8 +56,14 @@ interface SankeyEdgeStyleOption extends LineStyleOption {
curveness
?:
number
}
interface
ExtraStateOption
{
emphasis
?:
{
focus
?:
'
adjacency
'
}
}
export
interface
SankeyNodeItemOption
extends
SankeyNodeStateOption
,
StatesOptionMixin
<
SankeyNodeStateOption
,
'
adjacency
'
>
,
StatesOptionMixin
<
SankeyNodeStateOption
,
ExtraStateOption
>
,
OptionDataItemObject
<
OptionDataValue
>
{
id
?:
string
...
...
@@ -72,7 +78,7 @@ export interface SankeyNodeItemOption extends SankeyNodeStateOption,
}
export
interface
SankeyEdgeItemOption
extends
SankeyEdgeStateOption
,
StatesOptionMixin
<
SankeyEdgeStateOption
,
'
adjacency
'
>
{
extends
SankeyEdgeStateOption
,
StatesOptionMixin
<
SankeyEdgeStateOption
,
ExtraStateOption
>
{
/**
* Name or index of source node.
*/
...
...
@@ -89,7 +95,8 @@ export interface SankeyLevelOption {
depth
:
number
}
export
interface
SankeySeriesOption
extends
SeriesOption
<
SankeyBothStateOption
,
'
adjacency
'
>
,
SankeyBothStateOption
,
export
interface
SankeySeriesOption
extends
SeriesOption
<
SankeyBothStateOption
,
ExtraStateOption
>
,
SankeyBothStateOption
,
BoxLayoutOptionMixin
{
type
?:
'
sankey
'
...
...
src/chart/sunburst/SunburstSeries.ts
浏览文件 @
73d6d376
...
...
@@ -48,13 +48,19 @@ interface SunburstDataParams extends CallbackDataParams {
}[]
}
interface
ExtraStateOption
{
emphasis
?:
{
focus
?:
'
descendant
'
|
'
ancestor
'
}
}
export
interface
SunburstStateOption
{
itemStyle
?:
ItemStyleOption
label
?:
SunburstLabelOption
}
export
interface
SunburstSeriesNodeItemOption
extends
SunburstStateOption
,
StatesOptionMixin
<
SunburstStateOption
,
'
descendant
'
|
'
ancestor
'
>
,
SunburstStateOption
,
StatesOptionMixin
<
SunburstStateOption
,
ExtraStateOption
>
,
OptionDataItemObject
<
OptionDataValue
>
{
nodeClick
?:
'
rootToNode
'
|
'
link
'
...
...
@@ -75,7 +81,7 @@ export interface SunburstSeriesLevelOption extends SunburstStateOption, StatesOp
}
}
export
interface
SunburstSeriesOption
extends
SeriesOption
<
SunburstStateOption
,
'
descendant
'
|
'
ancestor
'
>
,
SunburstStateOption
,
SeriesOption
<
SunburstStateOption
,
ExtraStateOption
>
,
SunburstStateOption
,
CircleLayoutOptionMixin
{
type
?:
'
sunburst
'
...
...
src/chart/treemap/TreemapSeries.ts
浏览文件 @
73d6d376
...
...
@@ -72,6 +72,12 @@ interface TreemapSeriesCallbackDataParams extends CallbackDataParams {
treePathInfo
?:
TreePathInfo
[]
}
interface
ExtraStateOption
{
emphasis
?:
{
focus
?:
'
descendant
'
|
'
ancestor
'
}
}
export
interface
TreemapStateOption
{
itemStyle
?:
TreemapSeriesItemStyleOption
label
?:
TreemapSeriesLabelOption
...
...
@@ -106,13 +112,13 @@ export interface TreemapSeriesVisualOption {
}
export
interface
TreemapSeriesLevelOption
extends
TreemapSeriesVisualOption
,
TreemapStateOption
,
StatesOptionMixin
<
TreemapStateOption
,
'
ancestor
'
|
'
descendant
'
>
{
TreemapStateOption
,
StatesOptionMixin
<
TreemapStateOption
,
ExtraStateOption
>
{
color
?:
ColorString
[]
|
'
none
'
}
export
interface
TreemapSeriesNodeItemOption
extends
TreemapSeriesVisualOption
,
TreemapStateOption
,
StatesOptionMixin
<
TreemapStateOption
,
'
ancestor
'
|
'
descendant
'
>
{
TreemapStateOption
,
StatesOptionMixin
<
TreemapStateOption
,
ExtraStateOption
>
{
id
?:
string
name
?:
string
...
...
@@ -124,7 +130,7 @@ export interface TreemapSeriesNodeItemOption extends TreemapSeriesVisualOption,
}
export
interface
TreemapSeriesOption
extends
SeriesOption
<
TreemapStateOption
,
'
ancestor
'
|
'
descendant
'
>
,
TreemapStateOption
,
extends
SeriesOption
<
TreemapStateOption
,
ExtraStateOption
>
,
TreemapStateOption
,
BoxLayoutOptionMixin
,
RoamOptionMixin
,
TreemapSeriesVisualOption
{
...
...
src/component/helper/selectableMixin.ts
浏览文件 @
73d6d376
...
...
@@ -25,7 +25,7 @@
import
*
as
zrUtil
from
'
zrender/src/core/util
'
;
import
Model
from
'
../../model/Model
'
;
import
{
Dictionary
}
from
'
zrender/src/core
/types
'
;
import
{
Dictionary
}
from
'
../../util
/types
'
;
export
interface
SelectableTarget
{
name
?:
string
;
...
...
@@ -33,7 +33,8 @@ export interface SelectableTarget {
};
export
interface
DataSelectableOptionMixin
{
selected
?:
Dictionary
<
boolean
>
// selectedIndices?: number[]
selectedMap
?:
Dictionary
<
boolean
>
selectedMode
?:
'
single
'
|
'
multiple
'
|
boolean
}
...
...
@@ -46,7 +47,6 @@ class DataSelectableMixin<Opt extends DataSelectableOptionMixin> {
// Key: target.name
private
_selectTargetMap
:
zrUtil
.
HashMap
<
SelectableTarget
>
;
/**
* @param targetList [{name, value, selected}, ...]
* If targetList is an array, it should like [{name: ..., value: ...}, ...].
...
...
src/preprocessor/backwardCompat.ts
浏览文件 @
73d6d376
...
...
@@ -122,7 +122,9 @@ function compatGraphFocus(option: Dictionary<any>) {
if
(
option
.
focusNodeAdjacency
!=
null
)
{
option
.
emphasis
=
option
.
emphasis
||
{};
if
(
option
.
emphasis
.
focus
==
null
)
{
deprecateLog
(
'
`focusNodeAdjacency` in graph/sankey has been changed to `emphasis: { focus:
\'
adjacency
\'
}`
'
);
deprecateLog
(
'
`focusNodeAdjacency` in graph/sankey has been changed to `emphasis: { focus:
\'
adjacency
\'
}`
'
);
option
.
emphasis
.
focus
=
'
adjacency
'
;
}
}
...
...
src/util/types.ts
浏览文件 @
73d6d376
...
...
@@ -1167,7 +1167,8 @@ export interface StatesOptionMixin<StateOption = unknown, ExtraStateOpts extends
* series: Focus series and blur all other series.
*/
focus
?:
'
none
'
|
'
self
'
|
'
series
'
|
(
ExtraStateOpts
extends
unknown
?
never
:
ExtraStateOpts
[
'
emphasis
'
][
'
focus
'
])
(
unknown
extends
ExtraStateOpts
[
'
emphasis
'
][
'
focus
'
]
?
never
:
ExtraStateOpts
[
'
emphasis
'
][
'
focus
'
])
/**
* Scope of blurred element when focus.
...
...
test/hoverFocus2.html
浏览文件 @
73d6d376
...
...
@@ -67,9 +67,9 @@ under the License.
changeFocus
({
blurScope
:
'
coordinateSystem
'
});
}
},
{
text
:
'
Set blurScope:
al
l
'
,
text
:
'
Set blurScope:
globa
l
'
,
onclick
:
function
()
{
changeFocus
({
blurScope
:
'
al
l
'
});
changeFocus
({
blurScope
:
'
globa
l
'
});
}
}];
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录