Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
fcfe8423
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,发现更多精彩内容 >>
提交
fcfe8423
编写于
9月 03, 2018
作者:
O
Ovilia
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:ecomfe/echarts
上级
08f8ffc0
5ea50a8a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
92 addition
and
9 deletion
+92
-9
src/component/tooltip/TooltipRichContent.js
src/component/tooltip/TooltipRichContent.js
+2
-2
src/layout/barGrid.js
src/layout/barGrid.js
+18
-6
test/bar-start.html
test/bar-start.html
+72
-1
未找到文件。
src/component/tooltip/TooltipRichContent.js
浏览文件 @
fcfe8423
...
...
@@ -18,7 +18,7 @@
*/
import
*
as
zrUtil
from
'
zrender/src/core/util
'
;
import
Group
from
'
zrender/src/container/Group
'
;
//
import Group from 'zrender/src/container/Group';
import
Text
from
'
zrender/src/graphic/Text
'
;
/**
...
...
@@ -28,7 +28,7 @@ import Text from 'zrender/src/graphic/Text';
function
TooltipRichContent
(
api
)
{
// this.el = new Group();
var
zr
=
this
.
_zr
=
api
.
getZr
();
//
var zr = this._zr = api.getZr();
// zr.add(this.el);
this
.
_show
=
false
;
...
...
src/layout/barGrid.js
浏览文件 @
fcfe8423
...
...
@@ -420,11 +420,23 @@ function isInLargeMode(seriesModel) {
return
seriesModel
.
pipelineContext
&&
seriesModel
.
pipelineContext
.
large
;
}
// See cases in `test/bar-start.html` and `#7412`, `#8747`.
function
getValueAxisStart
(
baseAxis
,
valueAxis
,
stacked
)
{
return
(
zrUtil
.
indexOf
(
baseAxis
.
getAxesOnZeroOf
(),
valueAxis
)
>=
0
||
stacked
)
?
valueAxis
.
toGlobalCoord
(
valueAxis
.
dataToCoord
(
0
))
:
valueAxis
.
getGlobalExtent
()[
0
];
var
extent
=
valueAxis
.
getGlobalExtent
();
var
min
;
var
max
;
if
(
extent
[
0
]
>
extent
[
1
])
{
min
=
extent
[
1
];
max
=
extent
[
0
];
}
else
{
min
=
extent
[
0
];
max
=
extent
[
1
];
}
var
valueStart
=
valueAxis
.
toGlobalCoord
(
valueAxis
.
dataToCoord
(
0
));
valueStart
<
min
&&
(
valueStart
=
min
);
valueStart
>
max
&&
(
valueStart
=
max
);
return
valueStart
;
}
test/bar-start.html
浏览文件 @
fcfe8423
...
...
@@ -40,6 +40,7 @@ under the License.
<div
id=
"main0"
></div>
<div
id=
"main1"
></div>
<script>
...
...
@@ -64,6 +65,9 @@ under the License.
min
:
5000000
},
{
}],
grid
:
{
left
:
100
},
series
:
[{
name
:
'
bar
'
,
type
:
'
bar
'
,
...
...
@@ -72,7 +76,7 @@ under the License.
},
{
name
:
'
line
'
,
type
:
'
line
'
,
yAxisIndex
:
1
,
yAxisIndex
:
1
,
data
:
[
1.1496899
,
0.9420012
,
0.6743367
,
0.47701207
,
0.67934614
,
0.37843546
]
}]
};
...
...
@@ -85,5 +89,72 @@ under the License.
});
</script>
<script>
// See
<
https
:
//github.com/apache/incubator-echarts/issues/8747>
// Thanks to
<
https
:
//github.com/kuky121>
var
chart
;
var
myChart
;
var
option
;
require
([
'
echarts
'
/*, 'map/js/china' */
],
function
(
echarts
)
{
var
option
=
{
xAxis
:
[
{
type
:
'
category
'
,
data
:
[
'
Mon
'
,
'
Tue
'
,
'
Wed
'
,
'
Thu
'
,
'
Fri
'
,
'
Sat
'
,
'
Sun
'
],
axisTick
:
{
alignWithLabel
:
true
}
}
],
yAxis
:
[
{
type
:
'
value
'
},
{
type
:
'
value
'
}
],
series
:
[
{
yAxisIndex
:
0
,
name
:
'
数据1
'
,
type
:
'
bar
'
,
data
:[
10
,
-
52
]
},
{
yAxisIndex
:
1
,
name
:
'
数据2
'
,
type
:
'
bar
'
,
data
:[
10
,
-
52
]
}
]
};
chart
=
myChart
=
testHelper
.
create
(
echarts
,
'
main1
'
,
{
title
:
'
bar start should be correct when two Y axes exists
'
,
option
:
option
,
info
:
option
});
});
</script>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录