LBJDJW opened a new issue, #19760:
URL: https://github.com/apache/echarts/issues/19760
### Version
5.0
### Link to Minimal Reproduction
各位大佬们,请教一个问题,我用type: 'custom',
画置信椭圆的时候,坐标轴变了,api.coord方法传入一样的参数,出来的结果不一样,椭圆超出画布了
### Steps to Reproduce
各位大佬们,请教一个问题,我用type: 'custom',
画置信椭圆的时候,坐标轴变了,api.coord方法传入一样的参数,出来的结果不一样,椭圆超出画布了
### Current Behavior
把坐标轴的min max 改小 ,导致椭圆直接超出画布外面
### Expected Behavior
椭圆和之前改变坐标轴比例一样
`return {
type: 'custom',
groupId: groupId,
name: name,
data: [[xmean, ymean, majorAxis / 2, minorAxis / 2, color]],
encode: {
x: [0, 2],
y: [1, 3],
seriesName: [4],
},
silent: true,
useData: [xmean, ymean, majorAxis],
// clip: true,
renderItem: function(params, api) {
//问题出现在这里 改变坐标轴大小 p1 和 p2 一样的参数和传入进去,返回的p1和p2和之前不一样
var p1 = api.coord([api.value(0), api.value(1)]);
var p2 = api.coord([api.value(2) + api.value(0),
api.value(3) + api.value(1)]);
return {
type: 'ellipse',
shape: {
cx: p1[0],
cy: p1[1],
rx: p2[0] - p1[0],
ry: p1[1] - p2[1],
},
style: {
fill: api.value(4),
opacity: 0.4,
lineWidth:
configData?.lineWidth === 0 ||
configData?.lineWidth === '0'
? 0
: configData?.lineWidth
|| 2,
stroke: color,
lineDash: configData?.lineDash || [1,
0],
},
rotation: (angle * 180) / Math.PI,
originX: p1[0],
originY: p1[1],
};
},`
### Environment
```markdown
- OS:
- Browser:
- Framework:
```
### Any additional comments?
_No response_
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]