Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Five-菜鸟级
echarts
提交
b9637180
E
echarts
项目概览
Five-菜鸟级
/
echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b9637180
编写于
3月 18, 2020
作者:
P
pissang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ts: bug fixes
上级
fe09d9f3
变更
24
显示空白变更内容
内联
并排
Showing
24 changed file
with
40 addition
and
112 deletion
+40
-112
src/chart/boxplot/BoxplotSeries.ts
src/chart/boxplot/BoxplotSeries.ts
+2
-2
src/chart/boxplot/BoxplotView.ts
src/chart/boxplot/BoxplotView.ts
+2
-0
src/chart/candlestick/CandlestickSeries.ts
src/chart/candlestick/CandlestickSeries.ts
+1
-0
src/chart/graph/GraphSeries.ts
src/chart/graph/GraphSeries.ts
+2
-0
src/chart/graph/simpleLayoutHelper.ts
src/chart/graph/simpleLayoutHelper.ts
+1
-1
src/chart/helper/LinePath.ts
src/chart/helper/LinePath.ts
+4
-4
src/chart/map/MapSeries.ts
src/chart/map/MapSeries.ts
+2
-0
src/chart/map/MapView.ts
src/chart/map/MapView.ts
+2
-0
src/component/polar.ts
src/component/polar.ts
+3
-0
src/component/timeline/SliderTimelineModel.ts
src/component/timeline/SliderTimelineModel.ts
+3
-2
src/component/timeline/SliderTimelineView.ts
src/component/timeline/SliderTimelineView.ts
+1
-2
src/component/timeline/TimelineAxis.ts
src/component/timeline/TimelineAxis.ts
+4
-6
src/coord/cartesian/AxisModel.ts
src/coord/cartesian/AxisModel.ts
+0
-2
src/coord/cartesian/GridModel.ts
src/coord/cartesian/GridModel.ts
+0
-2
src/coord/geo/GeoModel.ts
src/coord/geo/GeoModel.ts
+0
-1
src/coord/parallel/AxisModel.ts
src/coord/parallel/AxisModel.ts
+1
-1
src/coord/parallel/ParallelModel.ts
src/coord/parallel/ParallelModel.ts
+1
-2
src/coord/polar/AxisModel.ts
src/coord/polar/AxisModel.ts
+4
-2
src/coord/single/AxisModel.ts
src/coord/single/AxisModel.ts
+1
-1
src/data/Graph.ts
src/data/Graph.ts
+2
-2
src/preprocessor/helper/compatStyle.ts
src/preprocessor/helper/compatStyle.ts
+2
-2
src/scale/Ordinal.ts
src/scale/Ordinal.ts
+1
-1
src/scale/Time.ts
src/scale/Time.ts
+1
-1
test/chord.html
test/chord.html
+0
-78
未找到文件。
src/chart/boxplot/BoxplotSeries.ts
浏览文件 @
b9637180
...
...
@@ -28,7 +28,6 @@ import {
LabelOption
,
OptionDataValueNumeric
}
from
'
../../util/types
'
;
import
ComponentModel
from
'
../../model/Component
'
;
import
type
Axis2D
from
'
../../coord/cartesian/Axis2D
'
;
import
Cartesian2D
from
'
../../coord/cartesian/Cartesian2D
'
;
...
...
@@ -74,6 +73,7 @@ export interface BoxplotSeriesOption extends SeriesOption, SeriesOnCartesianOpti
class
BoxplotSeriesModel
extends
SeriesModel
<
BoxplotSeriesOption
>
{
static
readonly
type
=
'
series.boxplot
'
readonly
type
=
BoxplotSeriesModel
.
type
static
readonly
dependencies
=
[
'
xAxis
'
,
'
yAxis
'
,
'
grid
'
]
...
...
@@ -133,6 +133,6 @@ interface BoxplotSeriesModel extends WhiskerBoxCommonMixin<BoxplotSeriesOption>
}
zrUtil
.
mixin
(
BoxplotSeriesModel
,
WhiskerBoxCommonMixin
,
true
);
Component
Model
.
registerClass
(
BoxplotSeriesModel
);
Series
Model
.
registerClass
(
BoxplotSeriesModel
);
export
default
BoxplotSeriesModel
;
src/chart/boxplot/BoxplotView.ts
浏览文件 @
b9637180
...
...
@@ -199,4 +199,6 @@ function transInit(points: number[][], dim: number, itemLayout: BoxplotItemLayou
});
}
ChartView
.
registerClass
(
BoxplotView
);
export
default
BoxplotView
;
src/chart/candlestick/CandlestickSeries.ts
浏览文件 @
b9637180
...
...
@@ -82,6 +82,7 @@ export interface CandlestickSeriesOption extends SeriesOption, SeriesOnCartesian
class
CandlestickSeriesModel
extends
SeriesModel
<
CandlestickSeriesOption
>
{
static
readonly
type
=
'
series.candlestick
'
readonly
type
=
CandlestickSeriesModel
.
type
static
readonly
dependencies
=
[
'
xAxis
'
,
'
yAxis
'
,
'
grid
'
]
...
...
src/chart/graph/GraphSeries.ts
浏览文件 @
b9637180
...
...
@@ -472,4 +472,6 @@ class GraphSeriesModel extends SeriesModel<GraphSeriesOption> {
}
}
SeriesModel
.
registerClass
(
GraphSeriesModel
);
export
default
GraphSeriesModel
;
\ No newline at end of file
src/chart/graph/simpleLayoutHelper.ts
浏览文件 @
b9637180
...
...
@@ -37,7 +37,7 @@ export function simpleLayout(seriesModel: GraphSeriesModel) {
}
export
function
simpleLayoutEdge
(
graph
:
Graph
)
{
graph
.
eachEdge
(
function
(
edge
)
{
graph
.
eachEdge
(
function
(
edge
,
idx
)
{
var
curveness
=
edge
.
getModel
<
GraphEdgeItemOption
>
().
get
([
'
lineStyle
'
,
'
curveness
'
])
||
0
;
var
p1
=
vec2
.
clone
(
edge
.
node1
.
getLayout
());
var
p2
=
vec2
.
clone
(
edge
.
node2
.
getLayout
());
...
...
src/chart/helper/LinePath.ts
浏览文件 @
b9637180
...
...
@@ -66,19 +66,19 @@ class ECLinePath extends graphic.Path<ECLineProps> {
buildPath
(
ctx
:
CanvasRenderingContext2D
,
shape
:
StraightLineShape
|
CurveShape
)
{
if
(
isStraightLine
(
shape
))
{
straightLineProto
.
buildPath
(
ctx
,
shape
);
straightLineProto
.
buildPath
.
call
(
this
,
ctx
,
shape
);
}
else
{
bezierCurveProto
.
buildPath
(
ctx
,
shape
);
bezierCurveProto
.
buildPath
.
call
(
this
,
ctx
,
shape
);
}
}
pointAt
(
t
:
number
)
{
if
(
isStraightLine
(
this
.
shape
))
{
return
straightLineProto
.
pointAt
(
t
);
return
straightLineProto
.
pointAt
.
call
(
this
,
t
);
}
else
{
return
bezierCurveProto
.
pointAt
(
t
);
return
bezierCurveProto
.
pointAt
.
call
(
this
,
t
);
}
}
...
...
src/chart/map/MapSeries.ts
浏览文件 @
b9637180
...
...
@@ -318,4 +318,6 @@ class MapSeries extends SeriesModel<MapSeriesOption> {
interface
MapSeries
extends
DataSelectableMixin
<
MapSeriesOption
>
{}
zrUtil
.
mixin
(
MapSeries
,
DataSelectableMixin
);
SeriesModel
.
registerClass
(
MapSeries
);
export
default
MapSeries
;
\ No newline at end of file
src/chart/map/MapView.ts
浏览文件 @
b9637180
...
...
@@ -266,4 +266,6 @@ function enterRegionHighDown(highDownRecord: HighDownRecord, toHighOrDown: boole
}
}
ChartView
.
registerClass
(
MapView
);
export
default
MapView
;
src/component/polar.ts
浏览文件 @
b9637180
...
...
@@ -21,6 +21,9 @@ import * as echarts from '../echarts';
import
*
as
zrUtil
from
'
zrender/src/core/util
'
;
import
barPolar
from
'
../layout/barPolar
'
;
// Import self registered models.
import
'
../coord/polar/PolarModel
'
;
import
'
../coord/polar/AxisModel
'
;
import
'
../coord/polar/polarCreator
'
;
import
'
./angleAxis
'
;
import
'
./radiusAxis
'
;
...
...
src/component/timeline/SliderTimelineModel.ts
浏览文件 @
b9637180
...
...
@@ -22,6 +22,7 @@ import DataFormatMixin from '../../model/mixin/dataFormat';
import
ComponentModel
from
'
../../model/Component
'
;
import
{
mixin
}
from
'
zrender/src/core/util
'
;
import
List
from
'
../../data/List
'
;
import
{
inheritDefaultOption
}
from
'
../../util/component
'
;
interface
SliderTimelineOption
extends
TimelineOption
{
}
...
...
@@ -34,7 +35,7 @@ class SliderTimelineModel extends TimelineModel {
/**
* @protected
*/
static
defaultOption
:
SliderTimelineOption
=
{
static
defaultOption
:
SliderTimelineOption
=
inheritDefaultOption
(
TimelineModel
.
defaultOption
,
{
backgroundColor
:
'
rgba(0,0,0,0)
'
,
// 时间轴背景颜色
borderColor
:
'
#ccc
'
,
// 时间轴边框颜色
...
...
@@ -119,7 +120,7 @@ class SliderTimelineModel extends TimelineModel {
}
},
data
:
[]
}
}
)
}
...
...
src/component/timeline/SliderTimelineView.ts
浏览文件 @
b9637180
...
...
@@ -24,7 +24,6 @@ import * as layout from '../../util/layout';
import
TimelineView
from
'
./TimelineView
'
;
import
TimelineAxis
from
'
./TimelineAxis
'
;
import
{
createSymbol
}
from
'
../../util/symbol
'
;
import
*
as
axisHelper
from
'
../../coord/axisHelper
'
;
import
*
as
numberUtil
from
'
../../util/number
'
;
import
{
encodeHTML
}
from
'
../../util/format
'
;
import
GlobalModel
from
'
../../model/Global
'
;
...
...
@@ -342,7 +341,7 @@ class SliderTimelineView extends TimelineView {
scale
.
niceTicks
();
var
axis
=
new
TimelineAxis
(
'
value
'
,
scale
,
layoutInfo
.
axisExtent
as
[
number
,
number
],
axisType
);
axis
.
timelineM
odel
=
timelineModel
;
axis
.
m
odel
=
timelineModel
;
return
axis
;
}
...
...
src/component/timeline/TimelineAxis.ts
浏览文件 @
b9637180
...
...
@@ -30,10 +30,8 @@ class TimelineAxis extends Axis {
type
:
'
category
'
|
'
time
'
|
'
value
'
// Not using the model.
model
:
never
timelineModel
:
TimelineModel
// @ts-ignore
model
:
TimelineModel
constructor
(
dim
:
string
,
scale
:
Scale
,
coordExtent
:
[
number
,
number
],
axisType
:
'
category
'
|
'
time
'
|
'
value
'
)
{
super
(
dim
,
scale
,
coordExtent
);
...
...
@@ -45,14 +43,14 @@ class TimelineAxis extends Axis {
*/
getLabelModel
()
{
// Force override
return
this
.
timelineM
odel
.
getModel
(
'
label
'
)
as
Model
<
LabelOption
>
;
return
this
.
m
odel
.
getModel
(
'
label
'
)
as
Model
<
LabelOption
>
;
}
/**
* @override
*/
isHorizontal
()
{
return
this
.
timelineM
odel
.
get
(
'
orient
'
)
===
'
horizontal
'
;
return
this
.
m
odel
.
get
(
'
orient
'
)
===
'
horizontal
'
;
}
}
...
...
src/coord/cartesian/AxisModel.ts
浏览文件 @
b9637180
...
...
@@ -68,8 +68,6 @@ class CartesianAxisModel extends ComponentModel<CartesianAxisOption>
}
}
ComponentModel
.
registerClass
(
CartesianAxisModel
);
interface
CartesianAxisModel
extends
AxisModelCommonMixin
<
CartesianAxisOption
>
,
AxisModelExtendedInCreator
<
CartesianAxisOption
>
{}
...
...
src/coord/cartesian/GridModel.ts
浏览文件 @
b9637180
...
...
@@ -65,6 +65,4 @@ class GridModel extends ComponentModel<GridOption> implements CoordinateSystemHo
}
}
ComponentModel
.
registerClass
(
GridModel
);
export
default
GridModel
;
src/coord/geo/GeoModel.ts
浏览文件 @
b9637180
...
...
@@ -34,7 +34,6 @@ import {
DisplayState
,
RoamOptionMixin
}
from
'
../../util/types
'
;
import
{
RoamType
}
from
'
../../component/helper/RoamController
'
;
import
{
NameMap
}
from
'
./geoTypes
'
;
import
GlobalModel
from
'
../../model/Global
'
;
...
...
src/coord/parallel/AxisModel.ts
浏览文件 @
b9637180
...
...
@@ -25,7 +25,7 @@ import axisModelCreator, { AxisModelExtendedInCreator } from '../axisModelCreato
import
*
as
numberUtil
from
'
../../util/number
'
;
import
{
AxisModelCommonMixin
}
from
'
../axisModelCommonMixin
'
;
import
ParallelAxis
from
'
./ParallelAxis
'
;
import
{
ComponentOption
,
ZRColor
,
ParsedValue
}
from
'
../../util/types
'
;
import
{
ZRColor
,
ParsedValue
}
from
'
../../util/types
'
;
import
{
AxisBaseOption
}
from
'
../axisCommonTypes
'
;
import
{
StyleProps
}
from
'
zrender/src/graphic/Style
'
;
import
Parallel
from
'
./Parallel
'
;
...
...
src/coord/parallel/ParallelModel.ts
浏览文件 @
b9637180
...
...
@@ -20,9 +20,8 @@
import
*
as
zrUtil
from
'
zrender/src/core/util
'
;
import
ComponentModel
from
'
../../model/Component
'
;
import
'
./AxisModel
'
;
import
Parallel
from
'
./Parallel
'
;
import
{
DimensionName
,
ComponentOption
,
BoxLayoutOptionMixin
,
Dictionary
}
from
'
../../util/types
'
;
import
{
DimensionName
,
ComponentOption
,
BoxLayoutOptionMixin
}
from
'
../../util/types
'
;
import
ParallelAxisModel
,
{
ParallelAxisOption
}
from
'
./AxisModel
'
;
import
GlobalModel
from
'
../../model/Global
'
;
import
ParallelSeries
from
'
../../chart/parallel/ParallelSeries
'
;
...
...
src/coord/polar/AxisModel.ts
浏览文件 @
b9637180
...
...
@@ -82,14 +82,16 @@ zrUtil.mixin(PolarAxisModel, AxisModelCommonMixin);
export
{
PolarAxisModel
};
export
class
AngleAxisModel
extends
PolarAxisModel
<
AngleAxisOption
>
{
static
type
=
'
angleAxis
'
type
=
AngleAxisModel
.
type
axis
:
AngleAxis
}
export
class
RadiusAxisModel
extends
PolarAxisModel
<
RadiusAxisOption
>
{
static
type
=
'
radiusAxis
'
type
=
RadiusAxisModel
.
type
axis
:
RadiusAxis
}
ComponentModel
.
registerClass
(
PolarAxisModel
);
const
angleAxisExtraOption
:
AngleAxisOption
=
{
startAngle
:
90
,
...
...
src/coord/single/AxisModel.ts
浏览文件 @
b9637180
src/data/Graph.ts
浏览文件 @
b9637180
...
...
@@ -459,8 +459,8 @@ function createGraphDataProxyMixin<Host extends GraphEdge | GraphNode>(
interface
GraphEdge
extends
ReturnType
<
typeof
createGraphDataProxyMixin
>
{};
interface
GraphNode
extends
ReturnType
<
typeof
createGraphDataProxyMixin
>
{};
zrUtil
.
mixin
(
Graph
Edg
e
,
createGraphDataProxyMixin
(
'
hostGraph
'
,
'
data
'
));
zrUtil
.
mixin
(
Graph
Nod
e
,
createGraphDataProxyMixin
(
'
hostGraph
'
,
'
edgeData
'
));
zrUtil
.
mixin
(
Graph
Nod
e
,
createGraphDataProxyMixin
(
'
hostGraph
'
,
'
data
'
));
zrUtil
.
mixin
(
Graph
Edg
e
,
createGraphDataProxyMixin
(
'
hostGraph
'
,
'
edgeData
'
));
export
default
Graph
;
...
...
src/preprocessor/helper/compatStyle.ts
浏览文件 @
b9637180
...
...
@@ -37,7 +37,7 @@ function deprecateLog(str: string) {
}
if
(
typeof
console
!==
'
undefined
'
&&
console
.
warn
)
{
storedLogs
[
str
]
=
true
;
console
.
warn
(
'
DEPRECATED:
'
+
str
);
console
.
warn
(
'
[ECharts]
DEPRECATED:
'
+
str
);
}
}
...
...
@@ -343,5 +343,5 @@ export default function (option: any, isTheme?: boolean) {
compatTextStyle
(
toObj
(
option
.
tooltip
).
axisPointer
,
'
label
'
);
// Clean logs
storedLogs
=
{};
//
storedLogs = {};
}
\ No newline at end of file
src/scale/Ordinal.ts
浏览文件 @
b9637180
...
...
@@ -35,7 +35,7 @@ import { AxisBaseOption } from '../coord/axisCommonTypes';
class
OrdinalScale
extends
Scale
{
type
:
'
ordinal
'
;
readonly
type
=
'
ordinal
'
private
_ordinalMeta
:
OrdinalMeta
;
...
...
src/scale/Time.ts
浏览文件 @
b9637180
...
...
@@ -73,7 +73,7 @@ var bisect = function (
class
TimeScale
extends
IntervalScale
{
type
=
'
time
'
;
readonly
type
=
'
time
'
;
private
_stepLvl
:
[
string
,
number
];
...
...
test/chord.html
已删除
100644 → 0
浏览文件 @
fe09d9f3
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<script
src=
"lib/esl.js"
></script>
<script
src=
"lib/config.js"
></script>
<script
src=
"lib/facePrint.js"
></script>
</head>
<body>
<style>
html
,
body
,
#main
{
width
:
100%
;
height
:
100%
;
}
</style>
<div
id=
"info"
></div>
<div
id=
"main"
></div>
<script>
require
([
'
echarts
'
// 'echarts/chart/chord',
// 'echarts/component/legend',
// 'echarts/component/grid',
// 'echarts/component/tooltip'
],
function
(
echarts
)
{
var
chart
=
echarts
.
init
(
document
.
getElementById
(
'
main
'
));
chart
.
setOption
({
tooltip
:
{
trigger
:
'
axis
'
,
axisPointer
:
{
type
:
'
line
'
}
},
series
:
[{
name
:
'
chord
'
,
type
:
'
chord
'
,
sort
:
'
descending
'
,
data
:
[
{
name
:
'
group1
'
},
{
name
:
'
group2
'
},
{
name
:
'
group3
'
},
{
name
:
'
group4
'
}
],
matrix
:
[
[
11975
,
5871
,
8916
,
2868
],
[
1951
,
10048
,
2060
,
6171
],
[
8010
,
16145
,
8090
,
8045
],
[
1013
,
990
,
940
,
6907
]
]
}]
});
})
</script>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录