echarts 十字坐标轴指示器横线无法吸附在折线图的点上

8dtrkrch  于 5个月前  发布在  Echarts
关注(0)|答案(5)|浏览(45)

Version

5.5.0

暂无

Steps to Reproduce

1、配置tooltip,
tooltip: {
trigger: 'none',
backgroundColor: 'rgba(255,255,255,0.6)',
extraCssText: 'z-index: 2',
axisPointer: {
type: 'cross',
snap: true,
axis: 'x',
z: 999
}
},
axisPointer: {
type: 'cross'
}

2、设置useCoarsePointer
echarts.init(
refMain.value,
null,
{
useCoarsePointer: true,
pointerSize: 200
}
)

Current Behavior

十字坐标轴指示器横线无法吸附在折线图的点上

Expected Behavior

十字坐标轴指示器横线无法吸附在折线图的点上

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

rlcwz9us

rlcwz9us1#

@yunyingchen 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. 🤗
TRANSLATED

TITLE

The crosshair indicator horizontal line cannot be snapped to a point in a line chart

5kgi1eie

5kgi1eie2#

The horizontal line of the cross axis indicator cannot be attached to the point of the line chart

It can, if both axes are type:'value' - Demo .

yiytaume

yiytaume3#

The horizontal line of the cross axis indicator cannot be attached to the point of the line chart

It can, if both axes are type:'value' - Demo .

My expectation is that the cross is at one point, and now the demo is at two points.

yuvru6vn

yuvru6vn4#

The horizontal line of the cross axis indicator cannot be attached to the point of the line chart十字轴指示器的水平线不能附加到折线图的点

It can, if both axes are type:'value' - Demo .如果两个轴都是 - 演示 ,则可以。

According to the case you provided, it seems that there is no way to precisely locate a point.

8xiog9wr

8xiog9wr5#

  1. when we have one category axis, axisPointer is always attached to it and axisPointer.axis value is ignored - Demo .
  2. when both axes are type 'value', axisPointer.axis could be set to 'x' or 'y', but not both - Demo

You asked for "horizontal line of the cross axis indicator attached to the point" so I gave you the second Demo (axis='y').
Having axisPointer attached to both axes is currently not permitted by the API.

相关问题