Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
c2f73f88
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,发现更多精彩内容 >>
提交
c2f73f88
编写于
7月 20, 2016
作者:
L
lang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix some bug when retrieving grid with id
上级
f7e97902
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
23 addition
and
24 deletion
+23
-24
src/component/axis/AxisView.js
src/component/axis/AxisView.js
+1
-1
src/component/dataZoom/DataZoomView.js
src/component/dataZoom/DataZoomView.js
+0
-12
src/coord/cartesian/AxisModel.js
src/coord/cartesian/AxisModel.js
+11
-0
src/coord/cartesian/Grid.js
src/coord/cartesian/Grid.js
+3
-7
test/lazyUpdate.html
test/lazyUpdate.html
+8
-4
未找到文件。
src/component/axis/AxisView.js
浏览文件 @
c2f73f88
...
...
@@ -38,7 +38,7 @@ define(function (require) {
return
;
}
var
gridModel
=
ecModel
.
getComponent
(
'
grid
'
,
axisModel
.
get
(
'
gridIndex
'
)
);
var
gridModel
=
axisModel
.
findGridModel
(
);
var
layout
=
layoutAxis
(
gridModel
,
axisModel
);
...
...
src/component/dataZoom/DataZoomView.js
浏览文件 @
c2f73f88
...
...
@@ -58,18 +58,6 @@ define(function (require) {
if
(
coordModel
!=
null
)
{
save
(
coordModel
,
axisModel
,
coordSysName
===
'
grid
'
?
cartesians
:
polars
,
coordModel
.
componentIndex
);
}
// var gridIndex = axisModel.get('gridIndex');
// var polarIndex = axisModel.get('polarIndex');
// if (gridIndex != null) {
// var coordModel = ecModel.getComponent('grid', gridIndex);
// save(coordModel, axisModel, cartesians, gridIndex);
// }
// else if (polarIndex != null) {
// var coordModel = ecModel.getComponent('polar', polarIndex);
// save(coordModel, axisModel, polars, polarIndex);
// }
}
},
this
);
...
...
src/coord/cartesian/AxisModel.js
浏览文件 @
c2f73f88
...
...
@@ -77,6 +77,17 @@ define(function(require) {
?
false
:
!
option
.
scale
;
},
/**
* @return {module:echarts/model/Model}
*/
findGridModel
:
function
()
{
return
this
.
ecModel
.
queryComponents
({
mainType
:
'
grid
'
,
index
:
this
.
get
(
'
gridIndex
'
),
id
:
this
.
get
(
'
gridId
'
)
})[
0
];
},
/**
* @private
*/
...
...
src/coord/cartesian/Grid.js
浏览文件 @
c2f73f88
...
...
@@ -25,7 +25,7 @@ define(function(require, factory) {
* @inner
*/
function
isAxisUsedInTheGrid
(
axisModel
,
gridModel
,
ecModel
)
{
return
ecModel
.
getComponent
(
'
grid
'
,
axisModel
.
get
(
'
gridIndex
'
)
)
===
gridModel
;
return
axisModel
.
findGridModel
(
)
===
gridModel
;
}
function
getLabelUnionRect
(
axis
)
{
...
...
@@ -450,11 +450,7 @@ define(function(require, factory) {
var
xAxisModel
=
axesModels
[
0
];
var
yAxisModel
=
axesModels
[
1
];
var
gridModel
=
ecModel
.
queryComponents
({
mainType
:
'
grid
'
,
index
:
xAxisModel
.
get
(
'
gridIndex
'
),
id
:
xAxisModel
.
get
(
'
gridId
'
)
})[
0
];
var
gridModel
=
xAxisModel
.
findGridModel
();
if
(
__DEV__
)
{
if
(
!
gridModel
)
{
...
...
@@ -466,7 +462,7 @@ define(function(require, factory) {
)
+
'
" not found
'
);
}
if
(
yAxisModel
.
get
(
'
gridIndex
'
)
!==
yAxisModel
.
get
(
'
gridIndex
'
))
{
if
(
xAxisModel
.
findGridModel
()
!==
yAxisModel
.
findGridModel
(
))
{
throw
new
Error
(
'
xAxis and yAxis must use the same grid
'
);
}
}
...
...
test/lazyUpdate.html
浏览文件 @
c2f73f88
...
...
@@ -55,7 +55,8 @@
}],
xAxis
:
[{
id
:
id
,
gridIndex
:
idx
,
gridId
:
id
,
// gridIndex: idx,
axisLabel
:
{
show
:
j
===
dimSize
-
1
},
...
...
@@ -69,7 +70,8 @@
}],
yAxis
:
[{
id
:
id
,
gridIndex
:
idx
,
gridId
:
id
,
// gridIndex: idx,
axisLabel
:
{
show
:
i
===
1
},
...
...
@@ -87,8 +89,10 @@
hoverAnimation
:
false
,
name
:
nameList
[
dataIdx
],
type
:
'
scatter
'
,
xAxisIndex
:
idx
,
yAxisIndex
:
idx
,
xAxisId
:
id
,
yAxisId
:
id
,
// xAxisIndex: idx,
// yAxisIndex: idx,
data
:
data
.
map
(
function
(
item
)
{
return
[
item
[
i
],
item
[
j
]];
}),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录