We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V4版本根据A,B,C,D坐标自行绘图,V5 如何实现
V4实现代码如下
PieChart.prototype.drawLinkArea = function () { const canvas = this.chart.getCanvas(); const container = this.chart.backgroundGroup; const view1_coord = this.view1.getCoordinate(); const center = view1_coord.getCenter(); const radius = view1_coord.getRadius(); const interval_geom = this.view2.geometries[0]; const interval_container = interval_geom.container; const interval_bbox = interval_container.getBBox(); const view2_coord = this.view2.getCoordinate(); // area points const pie_start1 = { x: center.x + Math.cos(Math.PI * 2 - this.otherOffsetAngle) * radius, y: center.y + Math.sin(Math.PI * 2 - this.otherOffsetAngle) * radius, }; const pie_start2 = { x: center.x + Math.cos(this.otherOffsetAngle) * radius, y: center.y + Math.sin(this.otherOffsetAngle) * radius, }; const interval_end1 = { x: interval_bbox.minX, y: view2_coord.end.y, }; const interval_end2 = { x: interval_bbox.minX, y: view2_coord.start.y, }; const path = [ ['M', pie_start1.x, pie_start1.y], ['L', pie_start2.x, pie_start2.y], ['L', interval_end2.x, interval_end2.y], ['L', interval_end1.x, interval_end1.y], ['Z'], ]; container.clear(); if (this.otherOffsetAngle > 0) { container.addShape('path', { attrs: { path, fill: '#e9f4fe', }, }); } canvas.draw(); };
No response
The text was updated successfully, but these errors were encountered:
其实和这个 demo 的能力有点像,但是现在官网确实没有做这个案例了。
https://g2.antv.antgroup.com/examples/annotation/connector#revenue-flow-waterfall
有兴趣可以尝试一下,来一个 PR。
Sorry, something went wrong.
No branches or pull requests
问题描述
V4版本根据A,B,C,D坐标自行绘图,V5 如何实现
V4实现代码如下
重现链接
No response
重现步骤
No response
预期行为
No response
平台
屏幕截图或视频(可选)
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: