Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
26f5b31f
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,发现更多精彩内容 >>
提交
26f5b31f
编写于
7月 24, 2013
作者:
K
kener
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
数值型坐标轴支持显示项目名字
上级
9e351ec6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
46 addition
and
8 deletion
+46
-8
doc/asset/js/echartsConfig.js
doc/asset/js/echartsConfig.js
+9
-1
doc/doc.html
doc/doc.html
+12
-0
doc/example/mix1.html
doc/example/mix1.html
+2
-0
src/component/valueAxis.js
src/component/valueAxis.js
+19
-7
src/config.js
src/config.js
+4
-0
未找到文件。
doc/asset/js/echartsConfig.js
浏览文件 @
26f5b31f
...
...
@@ -147,6 +147,8 @@
// 类目轴
categoryAxis
:
{
position
:
'
bottom
'
,
// 位置
name
:
''
,
// 坐标轴名字,默认为空
nameLocation
:
'
end
'
,
// 坐标轴名字位置,支持'start' | 'end'
boundaryGap
:
true
,
// 类目起始和结束两端空白策略
axisLine
:
{
// 坐标轴线
show
:
true
,
// 默认显示,属性show控制显示与否
...
...
@@ -193,6 +195,8 @@
// 数值型坐标轴默认参数
valueAxis
:
{
position
:
'
left
'
,
// 位置
name
:
''
,
// 坐标轴名字,默认为空
nameLocation
:
'
end
'
,
// 坐标轴名字位置,支持'start' | 'end'
boundaryGap
:
[
0
,
0
],
// 数值起始和结束两端空白策略
// min: null, // 最小值
// max: null, // 最大值
...
...
@@ -260,7 +264,11 @@
// color: 各异,
lineStyle
:
{
width
:
1
,
style
:
'
solid
'
style
:
'
solid
'
,
shadowColor
:
'
rgba(0,0,0,0)
'
,
//默认透明
shadowBlur
:
5
,
shadowOffsetX
:
3
,
shadowOffsetY
:
3
}
},
emphasis
:
{
...
...
doc/doc.html
浏览文件 @
26f5b31f
...
...
@@ -1035,6 +1035,18 @@ feature : {
<td>
通用
</td>
<td>
坐标轴类型,横轴默认为类目型'bottom',纵轴默认为数值型'left',可选为:'bottom' | 'top' | 'left' | 'right'
</td>
</tr>
<tr>
<td>
{string} name
</td>
<td>
''
</td>
<td>
数值型
</td>
<td>
坐标轴名称,默认为空
</td>
</tr>
<tr>
<td>
{string} nameLocation
</td>
<td>
'end'
</td>
<td>
数值型
</td>
<td>
坐标轴名称位置,默认为'end',可选为:'start' | 'end'
</td>
</tr>
<tr>
<td>
{boolean} boundaryGap
</td>
<td>
true
</td>
...
...
doc/example/mix1.html
浏览文件 @
26f5b31f
...
...
@@ -93,6 +93,7 @@ option = {
yAxis : [
{
type : 'value',
name : '水量',
axisLabel : {
formatter: '{value} ml'
},
...
...
@@ -100,6 +101,7 @@ option = {
},
{
type : 'value',
name : '温度',
axisLabel : {
formatter: '{value} °C'
},
...
...
src/component/valueAxis.js
浏览文件 @
26f5b31f
...
...
@@ -64,17 +64,17 @@ define(function (require) {
case
'
left
'
:
axShape
.
style
=
{
xStart
:
grid
.
getX
(),
yStart
:
grid
.
getY
(),
yStart
:
grid
.
getY
end
(),
xEnd
:
grid
.
getX
(),
yEnd
:
grid
.
getY
end
()
yEnd
:
grid
.
getY
()
};
break
;
case
'
right
'
:
axShape
.
style
=
{
xStart
:
grid
.
getXend
(),
yStart
:
grid
.
getY
(),
yStart
:
grid
.
getY
end
(),
xEnd
:
grid
.
getXend
(),
yEnd
:
grid
.
getY
end
()
yEnd
:
grid
.
getY
()
};
break
;
case
'
bottom
'
:
...
...
@@ -94,7 +94,10 @@ define(function (require) {
};
break
;
}
if
(
option
.
name
!==
''
)
{
axShape
.
style
.
text
=
option
.
name
;
axShape
.
style
.
textPosition
=
option
.
nameLocation
;
}
axShape
.
style
.
strokeColor
=
option
.
axisLine
.
lineStyle
.
color
;
axShape
.
style
.
lineWidth
=
option
.
axisLine
.
lineStyle
.
width
;
axShape
.
style
.
lineType
=
option
.
axisLine
.
lineStyle
.
type
;
...
...
@@ -190,7 +193,11 @@ define(function (require) {
color
:
textStyle
.
color
,
text
:
_valueLabel
[
i
],
textFont
:
self
.
getFont
(
textStyle
),
textAlign
:
'
center
'
,
textAlign
:
i
===
0
?
'
left
'
:
i
==
(
dataLength
-
1
)
?
'
right
'
:
'
center
'
,
textBaseline
:
baseLine
}
};
...
...
@@ -234,9 +241,14 @@ define(function (require) {
text
:
_valueLabel
[
i
],
textFont
:
self
.
getFont
(
textStyle
),
textAlign
:
align
,
textBaseline
:
'
middle
'
textBaseline
:
i
===
0
?
'
bottom
'
:
(
i
==
dataLength
-
1
)
?
'
top
'
:
'
middle
'
}
};
if
(
rotate
)
{
axShape
.
rotation
=
[
rotate
*
Math
.
PI
/
180
,
...
...
src/config.js
浏览文件 @
26f5b31f
...
...
@@ -178,6 +178,8 @@ define(function() {
// 类目轴
categoryAxis
:
{
position
:
'
bottom
'
,
// 位置
name
:
''
,
// 坐标轴名字,默认为空
nameLocation
:
'
end
'
,
// 坐标轴名字位置,支持'start' | 'end'
boundaryGap
:
true
,
// 类目起始和结束两端空白策略
axisLine
:
{
// 坐标轴线
show
:
true
,
// 默认显示,属性show控制显示与否
...
...
@@ -225,6 +227,8 @@ define(function() {
// 数值型坐标轴默认参数
valueAxis
:
{
position
:
'
left
'
,
// 位置
name
:
''
,
// 坐标轴名字,默认为空
nameLocation
:
'
end
'
,
// 坐标轴名字位置,支持'start' | 'end'
boundaryGap
:
[
0
,
0
],
// 数值起始和结束两端空白策略
// min: null, // 最小值
// max: null, // 最大值
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录