Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
103c9f7a
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,发现更多精彩内容 >>
提交
103c9f7a
编写于
6月 18, 2020
作者:
O
Ovilia
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'next' into feat-bar-race
上级
fb138d4a
de86b1a5
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
164 addition
and
36 deletion
+164
-36
option.ts
option.ts
+107
-0
src/chart/bar/PictorialBarSeries.ts
src/chart/bar/PictorialBarSeries.ts
+2
-0
src/chart/graph/GraphSeries.ts
src/chart/graph/GraphSeries.ts
+1
-1
src/chart/parallel/ParallelSeries.ts
src/chart/parallel/ParallelSeries.ts
+2
-0
src/component/dataZoom/InsideZoomModel.ts
src/component/dataZoom/InsideZoomModel.ts
+1
-1
src/component/dataZoom/SliderZoomModel.ts
src/component/dataZoom/SliderZoomModel.ts
+1
-1
src/component/dataset.ts
src/component/dataset.ts
+26
-23
src/component/timeline/SliderTimelineModel.ts
src/component/timeline/SliderTimelineModel.ts
+1
-1
src/coord/cartesian/GridModel.ts
src/coord/cartesian/GridModel.ts
+1
-1
src/util/clazz.ts
src/util/clazz.ts
+21
-7
src/util/types.ts
src/util/types.ts
+1
-1
未找到文件。
option.ts
0 → 100644
浏览文件 @
103c9f7a
/*
* 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.
*/
import
{
GridOption
}
from
'
./src/coord/cartesian/GridModel
'
;
import
{
PolarOption
}
from
'
./src/coord/polar/PolarModel
'
;
import
{
GeoOption
}
from
'
./src/coord/geo/GeoModel
'
;
import
{
SingleAxisOption
}
from
'
./src/coord/single/AxisModel
'
;
import
{
ParallelAxisOption
}
from
'
./src/coord/parallel/AxisModel
'
;
import
{
ParallelCoordinateSystemOption
}
from
'
./src/coord/parallel/ParallelModel
'
;
import
{
CalendarOption
}
from
'
./src/coord/calendar/CalendarModel
'
;
import
{
ToolboxOption
}
from
'
./src/component/toolbox/ToolboxModel
'
;
import
{
TooltipOption
}
from
'
./src/component/tooltip/TooltipModel
'
;
import
{
AxisPointerOption
}
from
'
./src/component/axisPointer/AxisPointerModel
'
;
import
{
BrushOption
}
from
'
./src/component/brush/BrushModel
'
;
import
{
TitleOption
}
from
'
./src/component/title
'
;
import
{
TimelineOption
}
from
'
./src/component/timeline/TimelineModel
'
;
import
{
SliderTimelineOption
}
from
'
./src/component/timeline/SliderTimelineModel
'
;
import
{
LegendOption
}
from
'
./src/component/legend/LegendModel
'
;
import
{
ScrollableLegendOption
}
from
'
./src/component/legend/ScrollableLegendModel
'
;
import
{
DataZoomOption
}
from
'
./src/component/dataZoom/DataZoomModel
'
;
import
{
SliderDataZoomOption
}
from
'
./src/component/dataZoom/SliderZoomModel
'
;
import
{
InsideDataZoomOption
}
from
'
./src/component/dataZoom/InsideZoomModel
'
;
import
{
VisualMapOption
}
from
'
./src/component/visualMap/VisualMapModel
'
;
import
{
ContinousVisualMapOption
}
from
'
./src/component/visualMap/ContinuousModel
'
;
import
{
PiecewiseVisualMapOption
}
from
'
./src/component/visualMap/PiecewiseModel
'
;
import
{
LineSeriesOption
}
from
'
./src/chart/line/LineSeries
'
;
import
{
BarSeriesOption
}
from
'
./src/chart/bar/BarSeries
'
;
import
{
ScatterSeriesOption
}
from
'
./src/chart/scatter/ScatterSeries
'
;
import
{
RadarSeriesOption
}
from
'
./src/chart/radar/RadarSeries
'
;
import
{
MapSeriesOption
}
from
'
./src/chart/map/MapSeries
'
;
import
{
TreeSeriesOption
}
from
'
./src/chart/tree/TreeSeries
'
;
import
{
TreemapSeriesOption
}
from
'
./src/chart/treemap/TreemapSeries
'
;
import
{
GraphSeriesOption
}
from
'
./src/chart/graph/GraphSeries
'
;
import
{
GaugeSeriesOption
}
from
'
./src/chart/gauge/GaugeSeries
'
;
import
{
FunnelSeriesOption
}
from
'
./src/chart/funnel/FunnelSeries
'
;
import
{
ParallelSeriesOption
}
from
'
./src/chart/parallel/ParallelSeries
'
;
import
{
SankeySeriesOption
}
from
'
./src/chart/sankey/SankeySeries
'
;
import
{
BoxplotSeriesOption
}
from
'
./src/chart/boxplot/BoxplotSeries
'
;
import
{
CandlestickSeriesOption
}
from
'
./src/chart/candlestick/CandlestickSeries
'
;
import
{
EffectScatterSeriesOption
}
from
'
./src/chart/effectScatter/EffectScatterSeries
'
;
import
{
LinesSeriesOption
}
from
'
./src/chart/lines/LinesSeries
'
;
import
{
HeatmapSeriesOption
}
from
'
./src/chart/heatmap/HeatmapSeries
'
;
import
{
PictorialBarSeriesOption
}
from
'
./src/chart/bar/PictorialBarSeries
'
;
import
{
ThemeRiverSeriesOption
}
from
'
./src/chart/themeRiver/ThemeRiverSeries
'
;
import
{
SunburstSeriesOption
}
from
'
./src/chart/sunburst/SunburstSeries
'
;
export
interface
EChartsOption
{
title
?:
TitleOption
|
TitleOption
[]
grid
?:
GridOption
|
GridOption
[]
polar
?:
PolarOption
|
PolarOption
[]
geo
?:
GeoOption
|
GeoOption
[]
singleAxis
?:
SingleAxisOption
|
SingleAxisOption
[]
parallel
?:
ParallelCoordinateSystemOption
|
ParallelCoordinateSystemOption
[]
parallelAxis
?:
ParallelAxisOption
|
ParallelAxisOption
[]
calendar
?:
CalendarOption
|
CalendarOption
[]
toolbox
?:
ToolboxOption
|
ToolboxOption
[]
tooltip
?:
TooltipOption
|
TooltipOption
[]
axisPointer
?:
AxisPointerOption
|
AxisPointerOption
[]
brush
?:
BrushOption
|
BrushOption
[]
timeline
?:
TimelineOption
|
SliderTimelineOption
|
(
TimelineOption
|
SliderTimelineOption
)[]
legend
?:
LegendOption
|
ScrollableLegendOption
|
(
LegendOption
|
ScrollableLegendOption
)[]
dataZoom
?:
SliderDataZoomOption
|
InsideDataZoomOption
|
(
SliderDataZoomOption
|
InsideDataZoomOption
)[]
visualMap
?:
(
ContinousVisualMapOption
|
PiecewiseVisualMapOption
)[]
series
?:
(
LineSeriesOption
|
BarSeriesOption
|
ScatterSeriesOption
|
RadarSeriesOption
|
MapSeriesOption
|
TreeSeriesOption
|
TreemapSeriesOption
|
GraphSeriesOption
|
GaugeSeriesOption
|
FunnelSeriesOption
|
ParallelSeriesOption
|
SankeySeriesOption
|
BoxplotSeriesOption
|
CandlestickSeriesOption
|
EffectScatterSeriesOption
|
LinesSeriesOption
|
HeatmapSeriesOption
|
PictorialBarSeriesOption
|
ThemeRiverSeriesOption
|
SunburstSeriesOption
)[]
}
\ No newline at end of file
src/chart/bar/PictorialBarSeries.ts
浏览文件 @
103c9f7a
...
...
@@ -109,6 +109,8 @@ export interface PictorialBarDataItemOption extends PictorialBarSeriesSymbolOpti
export
interface
PictorialBarSeriesOption
extends
BaseBarSeriesOption
,
PictorialBarSeriesSymbolOption
,
SeriesStackOptionMixin
{
type
?:
'
pictorialBar
'
coordinateSystem
?:
'
cartesian2d
'
data
?:
(
PictorialBarDataItemOption
|
PictorialBarValue
)[]
...
...
src/chart/graph/GraphSeries.ts
浏览文件 @
103c9f7a
...
...
@@ -137,7 +137,7 @@ export interface GraphCategoryItemOption extends SymbolOptionMixin {
}
}
interface
GraphSeriesOption
extends
SeriesOption
,
export
interface
GraphSeriesOption
extends
SeriesOption
,
SeriesOnCartesianOptionMixin
,
SeriesOnPolarOptionMixin
,
SeriesOnCalendarOptionMixin
,
SeriesOnGeoOptionMixin
,
SeriesOnSingleOptionMixin
,
SymbolOptionMixin
,
...
...
src/chart/parallel/ParallelSeries.ts
浏览文件 @
103c9f7a
...
...
@@ -56,6 +56,8 @@ export interface ParallelSeriesOption extends
SeriesOption
,
SeriesEncodeOptionMixin
{
type
?:
'
parallel
'
;
coordinateSystem
?:
string
;
parallelIndex
?:
number
;
parallelId
?:
string
;
...
...
src/component/dataZoom/InsideZoomModel.ts
浏览文件 @
103c9f7a
...
...
@@ -21,7 +21,7 @@ import DataZoomModel, {DataZoomOption} from './DataZoomModel';
import
ComponentModel
from
'
../../model/Component
'
;
import
{
inheritDefaultOption
}
from
'
../../util/component
'
;
interface
InsideDataZoomOption
extends
DataZoomOption
{
export
interface
InsideDataZoomOption
extends
DataZoomOption
{
/**
* Whether disable this inside zoom.
...
...
src/component/dataZoom/SliderZoomModel.ts
浏览文件 @
103c9f7a
...
...
@@ -29,7 +29,7 @@ import {
}
from
'
../../util/types
'
;
import
{
inheritDefaultOption
}
from
'
../../util/component
'
;
interface
SliderDataZoomOption
extends
DataZoomOption
,
BoxLayoutOptionMixin
{
export
interface
SliderDataZoomOption
extends
DataZoomOption
,
BoxLayoutOptionMixin
{
show
?:
boolean
/**
...
...
src/component/dataset.ts
浏览文件 @
103c9f7a
...
...
@@ -17,8 +17,6 @@
* under the License.
*/
// @ts-nocheck
/**
* This module is imported by echarts directly.
*
...
...
@@ -31,36 +29,41 @@
import
ComponentModel
from
'
../model/Component
'
;
import
ComponentView
from
'
../view/Component
'
;
import
{
detectSourceFormat
}
from
'
../data/helper/sourceHelper
'
;
import
{
SERIES_LAYOUT_BY_COLUMN
}
from
'
../util/types
'
;
ComponentModel
.
extend
({
import
{
SERIES_LAYOUT_BY_COLUMN
,
ComponentOption
,
SeriesEncodeOptionMixin
,
OptionSourceData
,
SeriesLayoutBy
}
from
'
../util/types
'
;
type
:
'
dataset
'
,
/**
* @protected
*/
defaultOption
:
{
interface
DatasetOption
extends
Pick
<
ComponentOption
,
'
type
'
|
'
id
'
|
'
name
'
>
,
Pick
<
SeriesEncodeOptionMixin
,
'
dimensions
'
>
{
seriesLayoutBy
?:
SeriesLayoutBy
;
// null/undefined/'auto': auto detect header, see "src/data/helper/sourceHelper".
sourceHeader
?:
boolean
|
'
auto
'
;
data
?:
OptionSourceData
;
}
// 'row', 'column'
seriesLayoutBy
:
SERIES_LAYOUT_BY_COLUMN
,
class
DatasetModel
extends
ComponentModel
{
// null/'auto': auto detect header, see "module:echarts/data/helper/sourceHelper"
sourceHeader
:
null
,
type
=
'
dataset
'
;
static
type
=
'
dataset
'
;
dimensions
:
null
,
static
defaultOption
:
DatasetOption
=
{
seriesLayoutBy
:
SERIES_LAYOUT_BY_COLUMN
};
source
:
null
},
optionUpdated
:
function
()
{
optionUpdated
()
{
detectSourceFormat
(
this
);
}
}
ComponentModel
.
registerClass
(
DatasetModel
);
});
ComponentView
.
extend
({
class
DatasetView
extends
ComponentView
{
static
type
=
'
dataset
'
;
type
=
'
dataset
'
;
}
type
:
'
dataset
'
ComponentView
.
registerClass
(
DatasetView
);
});
src/component/timeline/SliderTimelineModel.ts
浏览文件 @
103c9f7a
...
...
@@ -24,7 +24,7 @@ import { mixin } from 'zrender/src/core/util';
import
List
from
'
../../data/List
'
;
import
{
inheritDefaultOption
}
from
'
../../util/component
'
;
interface
SliderTimelineOption
extends
TimelineOption
{
export
interface
SliderTimelineOption
extends
TimelineOption
{
}
class
SliderTimelineModel
extends
TimelineModel
{
...
...
src/coord/cartesian/GridModel.ts
浏览文件 @
103c9f7a
...
...
@@ -24,7 +24,7 @@ import { ComponentOption, BoxLayoutOptionMixin, ZRColor, ShadowOptionMixin } fro
import
Grid
from
'
./Grid
'
;
import
{
CoordinateSystemHostModel
}
from
'
../CoordinateSystem
'
;
interface
GridOption
extends
ComponentOption
,
BoxLayoutOptionMixin
,
ShadowOptionMixin
{
export
interface
GridOption
extends
ComponentOption
,
BoxLayoutOptionMixin
,
ShadowOptionMixin
{
show
?:
boolean
;
// Whether grid size contain label.
...
...
src/util/clazz.ts
浏览文件 @
103c9f7a
...
...
@@ -99,17 +99,26 @@ export function enableClassExtend(rootClz: ExtendableConstructor, mandatoryMetho
// constructor.
// If this constructor/$constructor is declared, it is responsible for
// calling the super constructor.
const
ExtendedClass
=
(
class
{
constructor
()
{
if
(
!
proto
.
$constructor
)
{
function
ExtendedClass
(
this
:
any
,
...
args
:
any
[])
{
if
(
!
proto
.
$constructor
)
{
if
(
!
isESClass
(
superClass
))
{
// Will throw error if superClass is an es6 native class.
superClass
.
apply
(
this
,
arguments
);
}
else
{
proto
.
$constructor
.
apply
(
this
,
arguments
);
const
ins
=
zrUtil
.
createObject
(
// @ts-ignore
ExtendedClass
.
prototype
,
new
superClass
(...
args
)
);
return
ins
;
}
}
static
[
IS_EXTENDED_CLASS
]
=
true
;
})
as
ExtendableConstructor
;
else
{
proto
.
$constructor
.
apply
(
this
,
arguments
);
}
}
ExtendedClass
[
IS_EXTENDED_CLASS
]
=
true
;
zrUtil
.
extend
(
ExtendedClass
.
prototype
,
proto
);
...
...
@@ -119,10 +128,15 @@ export function enableClassExtend(rootClz: ExtendableConstructor, mandatoryMetho
zrUtil
.
inherits
(
ExtendedClass
,
this
);
ExtendedClass
.
superClass
=
superClass
;
return
ExtendedClass
as
ExtendableConstructor
;
return
ExtendedClass
as
unknown
as
ExtendableConstructor
;
};
}
function
isESClass
(
fn
:
unknown
):
boolean
{
return
typeof
fn
===
'
function
'
&&
/^class
\s
/
.
test
(
Function
.
prototype
.
toString
.
call
(
fn
));
}
/**
* A work around to both support ts extend and this extend mechanism.
* on sub-class.
...
...
src/util/types.ts
浏览文件 @
103c9f7a
...
...
@@ -1134,6 +1134,6 @@ export interface SeriesSamplingOptionMixin {
export
interface
SeriesEncodeOptionMixin
{
datasetIndex
?:
number
;
seriesLayoutBy
?:
SeriesLayoutBy
;
dimen
t
ions
?:
DimensionName
[];
dimen
s
ions
?:
DimensionName
[];
encode
?:
OptionEncode
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录