You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/03/16 12:03:52 UTC
[GitHub] [echarts] echarts-bot[bot] commented on issue #16687: [Bug] line chart : 同时使用echarts.graphic.LinearGradient和普通颜色, 坐标轴tooltip不跟随鼠标移动
echarts-bot[bot] commented on issue #16687:
URL: https://github.com/apache/echarts/issues/16687#issuecomment-1069052532
@gkqzdxajh It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
<details><summary><b>TRANSLATED</b></summary><br>
**TITLE**
[Bug] line chart : Using echarts.graphic.LinearGradient and normal colors, the axis tooltip does not follow mouse movements
**BODY**
### Version
5.3.0+
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
The configuration items are as follows:
`option = {
tooltip: {
trigger: 'axis',
textStyle: {
color: '#fff'
},
borderColor: 'rgba(255,255,255,.3)',
backgroundColor: 'rgba(13,5,30,.6)'
},
grid: {
top: 48 + 5, //itemHeight*2+itemGap
left: '4%',
right: '4%',
bottom: 0,
containLabel: true
},
legend: [
{
top: 0,
right: 0,
textStyle: {
color: 'auto'
},
itemWidth: 15,
data: [
{
name: 'Thermoelectric Power Generation - Today',
icon: 'circle'
},
{
name: 'Load operation-today',
icon: 'circle'
}
]
},
{
top: 20,
right: 0,
textStyle: {
color: 'auto'
},
itemWidth: 15,
itemHeight: 15,
data: [
{
name: 'Thermal Power Generation - Yesterday',
// icon: "path://M304.43 532.76H221.4c-11.47 0-20.76-9.3-20.76-20.76s9.29-20.76 20.76-20.76h83.03c11.47 0 20.76 9.3 20.76 20.76s-9.29 20.76s 20.76 20.76ZM581.19 532.76H442.81C-11.47 0-20.76-9.76-20.76 20.76-20.76H138.38C11.77 0 20.76 9.3 20.76 20.76S-9.3 20.76-20.76 20.76ZM802.59 532.76H -83.03c-11.47 0-20.76-9.3-20.76-20.76s9.29-20.76 20.76-20.76h83.03c11.47 0 20.76 9.3 20.76 20.76s-9.29 20.76-20.76 20.76z"
icon: 'path://M304.43 532.76H221.4c-11.47 0-20.76-9.3-20.76-20.76s9.29-20.76 20.76-20.76h83.03c17.47 0 20.76 9.3 20.76 20.76s-9.29 0.76s-9.29 0.76s-9.29 ZM581.19 532.76H442.81C-11.47 0-20.76-9.3-20.76-20.76S9.29-20.76 20.76-20.76H138.38C11.47 0 20.76 9.3 20.76 20.76S-9.3 20.76-20.76 20.76ZM802.59 532.76H-83.03 c-11.47 0-20.76-9.3-20.76-20.76s9.29-20.76 20.76-20.76h83.03c11.47 0 20.76 9.3 20.76 20.76s-9.29 20.76-20.76 20.76z'
},
{
name: 'Load operation-yesterday',
icon: 'path://M304.43 532.76H221.4c-11.47 0-20.76-9.3-20.76-20.76s9.29-20.76 20.76-20.76h83.03c17.47 0 20.76 9.3 20.76 20.76s-9.29 0.76s-9.29 0.76s-9.29 ZM581.19 532.76H442.81C-11.47 0-20.76-9.3-20.76-20.76S9.29-20.76 20.76-20.76H138.38C11.47 0 20.76 9.3 20.76 20.76S-9.3 20.76-20.76 20.76ZM802.59 532.76H-83.03 c-11.47 0-20.76-9.3-20.76-20.76s9.29-20.76 20.76-20.76h83.03c11.47 0 20.76 9.3 20.76 20.76s-9.29 20.76-20.76 20.76z'
}
]
}
],
xAxis: {
type: 'category',
boundaryGap: false,
data: ['01:00', '02:00', '03:00', '04:00']
},
yAxis: {
name: 'Power (MW)',
type: 'value',
nameTextStyle: {
color: '#fff'
},
splitLine: {
show: false
}
},
series: [
{
type: 'line',
name: 'Load operation-today',
smooth: true,
symbol: 'none',
itemStyle: {
color: 'rgb(255, 191, 0)'
},
lineStyle: {
width: 0
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgb(255, 191, 0)'
},
{
offset: 1,
color: 'rgb(255, 191, 0,0.1)'
}
])
},
data: [5, 6, 7, 8]
},
{
type: 'line',
name: 'Load operation-yesterday',
symbol: 'none',
label: {
show: !1,
position: 'top',
color: '#fff',
fontSize: 45
},
itemStyle: {
color: 'rgb(255, 191, 0)'
},
lineStyle: {
type: [5, 2.5]
},
data: [1, 2, 3, 4]
}
]
};`
### Current Behavior
`series` of line chart, an `areaStyle` configured with echarts.graphic.LinearGradient color, and one without using the `areaStyle` configuration item, `tooltip` of version 5.3.0 and above cannot follow the mouse movement
### Expected Behavior
The tooltip can move normally with the mouse
The configuration item option is as above
### Environment
````markdown
- OS: win10
- Browser: Chrome 98.0.4758.102
````
### Any additional comments?
_No response_
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org