-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Description
Version
^5.3.3
Link to Minimal Reproduction
No response
Steps to Reproduce
- set tooltip.trigger axis
- mouse move enter chart
- the line shown but tooltip is not shown
Current Behavior
option = {
title: {
show: false,
},
legend: {
data: ['百度', '谷歌'],
show: true,
selectedMode: true,
top: 'top',
right: 0,
orient: 'vertical',
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: "line"
},
},
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value',
},
series: [
{
name: '百度',
data: [65, 78, 130, 65, 56, 73, 89],
type: 'line',
smooth: true,
itemStyle: {
// 折线的颜色
color: 'rgb(249,120,69,1)',
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgba(249,120,69,0.8)',
},
{
offset: 1,
color: 'rgba(249,120,69,0.3)',
},
]),
},
},
{
name: '谷歌',
data: [65, 56, 123, 36, 32, 69, 78],
type: 'line',
smooth: true,
itemStyle: {
// 折线的颜色
color: 'rgba(58,77,233,1)',
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgba(58,77,233,0.8)',
},
{
offset: 1,
color: 'rgba(58,77,233,0.3)',
},
]),
},
},
],
}
Expected Behavior
option = {
title: {
show: false,
},
legend: {
data: ['百度', '谷歌'],
show: true,
selectedMode: true,
top: 'top',
right: 0,
orient: 'vertical',
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: "line"
},
},
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value',
},
series: [
{
name: '百度',
data: [65, 78, 130, 65, 56, 73, 89],
type: 'line',
smooth: true,
itemStyle: {
// 折线的颜色
color: 'rgb(249,120,69,1)',
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgba(249,120,69,0.8)',
},
{
offset: 1,
color: 'rgba(249,120,69,0.3)',
},
]),
},
},
{
name: '谷歌',
data: [65, 56, 123, 36, 32, 69, 78],
type: 'line',
smooth: true,
itemStyle: {
// 折线的颜色
color: 'rgba(58,77,233,1)',
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgba(58,77,233,0.8)',
},
{
offset: 1,
color: 'rgba(58,77,233,0.3)',
},
]),
},
},
],
}
Environment
- OS:
- Browser:
- Framework:Any additional comments?
When I put the option configuration in this https://echarts.apache.org/examples/zh/editor.html?c=line-stack&version=5.3.3, it works OK.