Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
d1c72d1d
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 搜索 >>
提交
d1c72d1d
编写于
12月 10, 2013
作者:
K
kener
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build文件更新,dataRange升级
上级
65185fc6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
67 addition
and
5 deletion
+67
-5
build/build.bat
build/build.bat
+4
-1
src/component/dataRange.js
src/component/dataRange.js
+63
-4
未找到文件。
build/build.bat
浏览文件 @
d1c72d1d
...
...
@@ -5,4 +5,7 @@ node build.js optimize=false plain=false output=echarts-original-map.js
node
build
.js
optimize
=
true
plain
=
true
exclude
=
map
output
=
echarts
-plain
.js
node
build
.js
optimize
=
true
plain
=
true
output
=
echarts
-plain-map
.js
node
build
.js
optimize
=
false
plain
=
true
exclude
=
map
output
=
echarts
-plain-original
.js
node
build
.js
optimize
=
false
plain
=
true
output
=
echarts
-plain-original-map
.js
\ No newline at end of file
node
build
.js
optimize
=
false
plain
=
true
output
=
echarts
-plain-original-map
.js
del
_config_tmp.js
cd
../src
del
_chart.js
\ No newline at end of file
src/component/dataRange.js
浏览文件 @
d1c72d1d
...
...
@@ -61,6 +61,8 @@ define(function (require) {
self
.
shapeList
[
i
].
id
=
zr
.
newShapeId
(
self
.
type
);
zr
.
addShape
(
self
.
shapeList
[
i
]);
}
_syncShapeFromRange
();
}
/**
...
...
@@ -290,7 +292,7 @@ define(function (require) {
y
:
_calculableLocation
.
y
,
width
:
_calculableLocation
.
width
,
height
:
_calculableLocation
.
height
,
color
:
'
rgba(255,255,255,0
.2
)
'
color
:
'
rgba(255,255,255,0)
'
},
draggable
:
true
,
ondrift
:
_ondrift
,
...
...
@@ -863,7 +865,16 @@ define(function (require) {
status
.
dragIn
=
true
;
if
(
!
dataRangeOption
.
realtime
)
{
messageCenter
.
dispatch
(
ecConfig
.
EVENT
.
DATA_RANGE
);
messageCenter
.
dispatch
(
ecConfig
.
EVENT
.
DATA_RANGE
,
null
,
{
range
:
{
start
:
_range
.
end
,
end
:
_range
.
start
}
}
);
}
status
.
needRefresh
=
false
;
// 会有消息触发fresh,不用再刷一遍
...
...
@@ -873,6 +884,39 @@ define(function (require) {
return
;
}
// 外部传入range
function
_syncShapeFromRange
()
{
if
(
dataRangeOption
.
range
)
{
// 做一个反转
if
(
typeof
dataRangeOption
.
range
.
start
!=
'
undefined
'
)
{
_range
.
end
=
dataRangeOption
.
range
.
start
;
}
if
(
typeof
dataRangeOption
.
range
.
end
!=
'
undefined
'
)
{
_range
.
start
=
dataRangeOption
.
range
.
end
;
}
if
(
_range
.
start
!=
100
||
_range
.
end
!==
0
)
{
// 非默认满值同步一下图形
if
(
dataRangeOption
.
orient
==
'
horizontal
'
)
{
// 横向
var
width
=
_fillerShae
.
style
.
width
;
_fillerShae
.
style
.
x
+=
width
*
(
100
-
_range
.
start
)
/
100
;
_fillerShae
.
style
.
width
=
width
*
(
_range
.
start
-
_range
.
end
)
/
100
;
}
else
{
// 纵向
var
height
=
_fillerShae
.
style
.
height
;
_fillerShae
.
style
.
y
+=
height
*
(
100
-
_range
.
start
)
/
100
;
_fillerShae
.
style
.
height
=
height
*
(
_range
.
start
-
_range
.
end
)
/
100
;
}
zr
.
modShape
(
_fillerShae
.
id
,
_fillerShae
);
_syncHandleShape
();
}
}
}
function
_syncHandleShape
()
{
var
x
=
_calculableLocation
.
x
;
...
...
@@ -1022,7 +1066,16 @@ define(function (require) {
function
_syncData
()
{
if
(
dataRangeOption
.
realtime
)
{
messageCenter
.
dispatch
(
ecConfig
.
EVENT
.
DATA_RANGE
);
messageCenter
.
dispatch
(
ecConfig
.
EVENT
.
DATA_RANGE
,
null
,
{
range
:
{
start
:
_range
.
end
,
end
:
_range
.
start
}
}
);
}
}
...
...
@@ -1093,7 +1146,6 @@ define(function (require) {
)
);
}
_range
=
{
start
:
100
,
end
:
0
...
...
@@ -1117,10 +1169,17 @@ define(function (require) {
);
}
dataRangeOption
=
option
.
dataRange
;
// 做一个反转
dataRangeOption
.
range
=
{
start
:
_range
.
end
,
end
:
_range
.
start
};
/*
_range = {
start: 100,
end: 0
};
*/
self
.
clear
();
_buildShape
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录