Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
missman
incubator-echarts
提交
2e9fc90b
I
incubator-echarts
项目概览
missman
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
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,发现更多精彩内容 >>
提交
2e9fc90b
编写于
10月 13, 2015
作者:
P
pah100
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/pissang/echarts-next
上级
f774c434
ad1be805
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
65 addition
and
28 deletion
+65
-28
src/chart/pie.js
src/chart/pie.js
+1
-1
src/component/dataZoom/dataZoomProcessor.js
src/component/dataZoom/dataZoomProcessor.js
+1
-1
src/component/legend.js
src/component/legend.js
+1
-1
src/coord/cartesian/Grid.js
src/coord/cartesian/Grid.js
+14
-11
src/coord/cartesian/axisLabelInterval.js
src/coord/cartesian/axisLabelInterval.js
+4
-3
src/echarts.js
src/echarts.js
+44
-11
未找到文件。
src/chart/pie.js
浏览文件 @
2e9fc90b
...
...
@@ -12,5 +12,5 @@ define(function (require) {
require
(
'
./pie/pieLayout
'
),
'
pie
'
));
echarts
.
registerProcessor
(
require
(
'
./pie/dataItemFilter
'
));
echarts
.
registerProcessor
(
'
filter
'
,
require
(
'
./pie/dataItemFilter
'
));
});
\ No newline at end of file
src/component/dataZoom/dataZoomProcessor.js
浏览文件 @
2e9fc90b
...
...
@@ -7,7 +7,7 @@ define(function (require) {
var
zrUtil
=
require
(
'
zrender/core/util
'
);
var
linearMap
=
require
(
'
../../util/number
'
).
linearMap
;
echarts
.
registerProcessor
(
function
(
ecModel
)
{
echarts
.
registerProcessor
(
'
filter
'
,
function
(
ecModel
)
{
ecModel
.
eachComponent
(
'
dataZoom
'
,
function
(
dataZoomModel
)
{
dataZoomModel
.
eachTargetAxis
(
processSingleAxis
);
});
...
...
src/component/legend.js
浏览文件 @
2e9fc90b
...
...
@@ -9,5 +9,5 @@ define(function (require) {
var
echarts
=
require
(
'
../echarts
'
);
// Series Filter
echarts
.
registerProcessor
(
require
(
'
./legend/legendFilter
'
));
echarts
.
registerProcessor
(
'
filter
'
,
require
(
'
./legend/legendFilter
'
));
});
\ No newline at end of file
src/coord/cartesian/Grid.js
浏览文件 @
2e9fc90b
...
...
@@ -59,6 +59,16 @@ define(function(require, factory) {
&&
axis
.
type
!==
CATEGORY_AXIS_TYPE
}
function
niceScaleExent
(
axis
,
model
)
{
if
(
axis
.
scale
.
type
===
'
ordinal
'
)
{
return
;
}
var
min
=
model
.
get
(
'
min
'
);
var
max
=
model
.
get
(
'
max
'
);
axis
.
scale
.
setExtent
(
min
,
max
);
axis
.
scale
.
niceExtent
(
model
.
get
(
'
splitNumber
'
),
!!
min
,
!!
max
);
}
function
Grid
(
gridModel
,
ecModel
,
api
)
{
/**
...
...
@@ -233,7 +243,6 @@ define(function(require, factory) {
this
.
_updateCartesianFromSeries
(
ecModel
,
gridModel
);
// Fix configuration
zrUtil
.
each
(
axesMap
.
x
,
function
(
xAxis
)
{
zrUtil
.
each
(
axesMap
.
y
,
function
(
yAxis
)
{
...
...
@@ -253,9 +262,13 @@ define(function(require, factory) {
if
(
ifAxisNeedsCrossZero
(
yAxis
,
xAxis
))
{
yAxis
.
scale
.
unionExtent
([
0
,
0
]);
niceScaleExent
(
yAxis
,
yAxis
.
model
);
}
if
(
ifAxisNeedsCrossZero
(
xAxis
,
yAxis
))
{
xAxis
.
scale
.
unionExtent
([
0
,
0
]);
niceScaleExent
(
xAxis
,
xAxis
.
model
);
}
},
this
);
...
...
@@ -337,16 +350,6 @@ define(function(require, factory) {
}
}
},
this
);
function
niceScaleExent
(
axis
,
model
)
{
if
(
axis
.
scale
.
type
===
'
ordinal
'
)
{
return
;
}
var
min
=
model
.
get
(
'
min
'
);
var
max
=
model
.
get
(
'
max
'
);
axis
.
scale
.
setExtent
(
min
,
max
);
axis
.
scale
.
niceExtent
(
model
.
get
(
'
splitNumber
'
),
!!
min
,
!!
max
);
}
}
};
...
...
src/coord/cartesian/axisLabelInterval.js
浏览文件 @
2e9fc90b
...
...
@@ -12,8 +12,7 @@ define(function(require) {
var
labelModel
=
axisModel
.
getModel
(
'
axisLabel
'
);
var
labelInterval
=
labelModel
.
get
(
'
interval
'
);
if
(
!
(
axis
.
isHorizontal
()
&&
axis
.
type
===
'
category
'
!
(
axis
.
type
===
'
category
'
&&
labelInterval
===
'
auto
'
&&
!
labelModel
.
get
(
'
rotate
'
))
)
{
...
...
@@ -29,13 +28,15 @@ define(function(require) {
var
autoLabelInterval
=
0
;
var
accumulatedLabelInterval
=
0
;
var
isAxisHorizontal
=
axis
.
isHorizontal
();
for
(
var
i
=
0
;
i
<
ticks
.
length
;
i
++
)
{
var
tick
=
ticks
[
i
];
var
tickCoord
=
axis
.
dataToCoord
(
tick
);
var
rect
=
textContain
.
getBoundingRect
(
labels
[
i
],
font
,
'
center
'
,
'
top
'
);
rect
.
x
+=
tickCoord
;
rect
[
isAxisHorizontal
?
'
x
'
:
'
y
'
]
+=
tickCoord
;
if
(
!
textSpaceTakenRect
)
{
textSpaceTakenRect
=
rect
.
clone
();
}
...
...
src/echarts.js
浏览文件 @
2e9fc90b
/**
* TODO visualCoding 的优先级
* setTheme
* TODO setTheme
* axis position 统一处理
* 规范 Symbol 配置和绘制, customPath
*
...
...
@@ -23,6 +22,8 @@ define(function (require) {
var
VISUAL_CODING_STAGES
=
[
'
echarts
'
,
'
chart
'
,
'
component
'
];
var
PROCESSOR_STAGES
=
[
'
transform
'
,
'
filter
'
,
'
statistic
'
];
/**
* @module echarts~ECharts
*/
...
...
@@ -253,7 +254,7 @@ define(function (require) {
for
(
var
i
=
0
;
i
<
chartsList
.
length
;)
{
var
chart
=
chartsList
[
i
];
if
(
!
chart
.
__keepAlive
)
{
if
(
!
chart
.
__keepAlive
)
{
zr
.
remove
(
chart
.
group
);
chart
.
dispose
(
this
.
_extensionAPI
);
chartsList
.
splice
(
i
,
1
);
...
...
@@ -323,8 +324,10 @@ define(function (require) {
* @private
*/
_processData
:
function
(
ecModel
)
{
zrUtil
.
each
(
dataProcessorFuncs
,
function
(
processor
)
{
processor
(
ecModel
);
zrUtil
.
each
(
PROCESSOR_STAGES
,
function
(
stage
)
{
zrUtil
.
each
(
dataProcessorFuncs
[
stage
]
||
[],
function
(
process
)
{
process
(
ecModel
);
});
});
},
...
...
@@ -436,14 +439,36 @@ define(function (require) {
};
var
dataProcessorFuncs
=
[];
/**
* @type {Array.<Function>}
* @inner
*/
var
actions
=
[];
/**
* @type {Array.<Function>}
* @inner
*/
var
layoutClasses
=
[];
/**
* @type {Array.<Function>}
* @inner
*/
var
layoutFuncs
=
[];
/**
* Data processor functions of each stage
* @type {Array.<Object.<string, Function>>}
* @inner
*/
var
dataProcessorFuncs
=
{};
/**
* Visual coding functions of each stage
* @type {Array.<Object.<string, Function>>}
* @inner
*/
var
visualCodingFuncs
=
{};
/**
...
...
@@ -451,17 +476,25 @@ define(function (require) {
*/
var
echarts
=
{
/**
* @param {HTMLDomElement} dom
* @param {Object} [theme]
* @param {Object} opts
*/
init
:
function
(
dom
,
theme
,
opts
)
{
return
new
ECharts
(
dom
,
theme
,
opts
);
},
/**
* @param {Function}
* @param {string} stage
* @param {Function} processorFunc
*/
registerProcessor
:
function
(
processorFunc
)
{
if
(
zrUtil
.
indexOf
(
dataProcessorFuncs
,
processorFunc
)
<
0
)
{
dataProcessorFuncs
.
push
(
processorFunc
);
registerProcessor
:
function
(
stage
,
processorFunc
)
{
if
(
zrUtil
.
indexOf
(
PROCESSOR_STAGES
,
stage
)
<
0
)
{
throw
new
Error
(
'
stage should be one of
'
+
PROCESSOR_STAGES
);
}
var
funcs
=
dataProcessorFuncs
[
stage
]
||
(
dataProcessorFuncs
[
stage
]
=
[]);
funcs
.
push
(
processorFunc
);
},
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录