Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
20803788
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,发现更多精彩内容 >>
提交
20803788
编写于
6月 03, 2014
作者:
K
kener
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
axis label支持点击事件 #287
上级
c35ce56a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
38 addition
and
6 deletion
+38
-6
src/component/axis.js
src/component/axis.js
+20
-0
src/component/categoryAxis.js
src/component/categoryAxis.js
+8
-3
src/component/valueAxis.js
src/component/valueAxis.js
+7
-2
src/config.js
src/config.js
+2
-0
src/echarts.js
src/echarts.js
+1
-1
未找到文件。
src/component/axis.js
浏览文件 @
20803788
...
...
@@ -19,7 +19,9 @@ define(function (require) {
var
LineShape
=
require
(
'
zrender/shape/Line
'
);
var
ecConfig
=
require
(
'
../config
'
);
var
ecData
=
require
(
'
../util/ecData
'
);
var
zrUtil
=
require
(
'
zrender/tool/util
'
);
var
zrColor
=
require
(
'
zrender/tool/color
'
);
/**
* 构造函数
...
...
@@ -127,6 +129,24 @@ define(function (require) {
this
.
shapeList
.
push
(
axShape
);
},
_axisLabelClickable
:
function
(
clickable
,
axShape
)
{
if
(
clickable
)
{
ecData
.
pack
(
axShape
,
undefined
,
-
1
,
undefined
,
-
1
,
axShape
.
style
.
text
);
axShape
.
hoverable
=
true
;
axShape
.
clickable
=
true
;
axShape
.
highlightStyle
=
{
color
:
zrColor
.
lift
(
axShape
.
style
.
color
,
1
),
brushType
:
'
fill
'
};
return
axShape
;
}
else
{
return
axShape
;
}
},
refixAxisShape
:
function
(
zeroX
,
zeroY
)
{
if
(
!
this
.
option
.
axisLine
.
onZero
)
{
return
;
...
...
src/component/categoryAxis.js
浏览文件 @
20803788
...
...
@@ -260,6 +260,7 @@ define(function (require) {
var
dataLength
=
this
.
option
.
data
.
length
;
var
rotate
=
this
.
option
.
axisLabel
.
rotate
;
var
margin
=
this
.
option
.
axisLabel
.
margin
;
var
clickable
=
this
.
option
.
axisLabel
.
clickable
;
var
textStyle
=
this
.
option
.
axisLabel
.
textStyle
;
var
dataTextStyle
;
...
...
@@ -311,7 +312,9 @@ define(function (require) {
axShape
.
style
.
y
];
}
this
.
shapeList
.
push
(
new
TextShape
(
axShape
));
this
.
shapeList
.
push
(
new
TextShape
(
this
.
_axisLabelClickable
(
clickable
,
axShape
)
));
}
}
else
{
...
...
@@ -364,11 +367,13 @@ define(function (require) {
axShape
.
style
.
y
];
}
this
.
shapeList
.
push
(
new
TextShape
(
axShape
));
this
.
shapeList
.
push
(
new
TextShape
(
this
.
_axisLabelClickable
(
clickable
,
axShape
)
));
}
}
},
_buildSplitLine
:
function
()
{
var
axShape
;
//var data = this.option.data;
...
...
src/component/valueAxis.js
浏览文件 @
20803788
...
...
@@ -131,6 +131,7 @@ define(function (require) {
var
dataLength
=
this
.
_valueList
.
length
;
var
rotate
=
this
.
option
.
axisLabel
.
rotate
;
var
margin
=
this
.
option
.
axisLabel
.
margin
;
var
clickable
=
this
.
option
.
axisLabel
.
clickable
;
var
textStyle
=
this
.
option
.
axisLabel
.
textStyle
;
if
(
this
.
isHorizontal
())
{
...
...
@@ -173,7 +174,9 @@ define(function (require) {
axShape
.
style
.
y
];
}
this
.
shapeList
.
push
(
new
TextShape
(
axShape
));
this
.
shapeList
.
push
(
new
TextShape
(
this
.
_axisLabelClickable
(
clickable
,
axShape
)
));
}
}
else
{
...
...
@@ -218,7 +221,9 @@ define(function (require) {
axShape
.
style
.
y
];
}
this
.
shapeList
.
push
(
new
TextShape
(
axShape
));
this
.
shapeList
.
push
(
new
TextShape
(
this
.
_axisLabelClickable
(
clickable
,
axShape
)
));
}
}
},
...
...
src/config.js
浏览文件 @
20803788
...
...
@@ -314,6 +314,7 @@ define(function() {
interval
:
'
auto
'
,
rotate
:
0
,
margin
:
8
,
// clickable: false,
// formatter: null,
textStyle
:
{
// 其余属性默认使用全局文本样式,详见TEXTSTYLE
color
:
'
#333
'
...
...
@@ -372,6 +373,7 @@ define(function() {
show
:
true
,
rotate
:
0
,
margin
:
8
,
// clickable: false,
// formatter: null,
textStyle
:
{
// 其余属性默认使用全局文本样式,详见TEXTSTYLE
color
:
'
#333
'
...
...
src/echarts.js
浏览文件 @
20803788
...
...
@@ -547,7 +547,7 @@ define(function (require) {
var
seriesIndex
=
ecData
.
get
(
target
,
'
seriesIndex
'
);
var
dataIndex
=
ecData
.
get
(
target
,
'
dataIndex
'
);
dataIndex
=
this
.
component
.
dataZoom
dataIndex
=
seriesIndex
!=
-
1
&&
this
.
component
.
dataZoom
?
this
.
component
.
dataZoom
.
getRealDataIndex
(
seriesIndex
,
dataIndex
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录