Version
4.8.0
Steps to reproduce
Add multiple grid in echarts with multiple xaxis (xAxisType: 'time') and yaxis add series in each grid, hover over any 1 grid on the canvas
What is expected?
Expectation is tool tip of both series (gridIndex: 0 series and gridIndex:1sereis) should be visible together.
What is actually happening?
In actual, only the grid over which mouse is hovered the tooltip of that grid is shown not the tooltips of both the series.
This works fine when xAxis type is 'category', but the same behavior is not there when xaxis type is 'time'
6条答案
按热度按时间oxalkeyp1#
Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.
In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.
If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org . Please attach the issue link if it's a technical question.
If you are interested in the project, you may also subscribe our mailing list .
Have a nice day! 🍵
bvhaajcl2#
Modified code from examples to reproduce the issue:
function randomData() {
now = new Date(+now + oneDay);
value = value + Math.random() * 21 - 10;
return {
name: now.toString(),
value: [
[now.getFullYear(), now.getMonth() + 1, now.getDate()].join('/'),
Math.round(value)
]
};
}
var data = [];
var now = +new Date(1997, 9, 3);
var oneDay = 24 * 3600 * 1000;
var value = Math.random() * 1000;
for (var i = 0; i < 1000; i++) {
data.push(randomData());
}
option = {
title: {
text: '动态数据 + 时间坐标轴'
},
tooltip: {
trigger: 'axis',
formatter: function (params) {
params = params[0];
var date = new Date(params.name);
return date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear() + ' : ' + params.value[1];
},
axisPointer: {
animation: false
}
},
grid: [{
left: 50,
right: 50,
height: '35%'
}, {
left: 50,
right: 50,
top: '55%',
height: '35%'
}],
xAxis: [{
type: 'time',
splitLine: {
show: false
}
},{
type: 'time',
splitLine: {
show: false
},
gridIndex: 1
}],
yAxis: [{
type: 'value',
boundaryGap: [0, '100%'],
splitLine: {
show: false
}
},{
type: 'value',
boundaryGap: [0, '100%'],
splitLine: {
show: false
},
gridIndex: 1
}],
series: [{
name: '模拟数据',
type: 'line',
showSymbol: false,
hoverAnimation: false,
data: data
},
{
name: '模拟数据',
type: 'line',
showSymbol: false,
hoverAnimation: false,
data: data,
xAxisIndex: 1,
yAxisIndex: 1
}]
};
setInterval(function () {
}, 1000);
mrzz3bfm3#
Could you try with 5.0.1?
r8uurelv4#
Could you try with 5.0.1?
It does not work in latest version, I'm trying to achieve the same thing without success. I have 4 grids. Each grid contains one yAxis and 3 xAxis attached to each yAxis. Here is the example
Here is the code that can be use in the online editor:
Show Code
When hovering over the grid I get the tooltip for only the series in the section on the grid the mouse is over:
And we are trying to achive something like this:
zfycwa2u5#
hey, any update about this thread ? @thefat32 I'm too interested to this feature, I have not understood the whole setup but what is the parameter to have the dashed grey cutline along graphs in horizontal ? thanks
7z5jn7bk6#
I found @thefat32 it need just to add in echarts config:
I hope it helps