在大于图表的 CartesianDataCanvas 项目上绘制

发布于 2024-09-17 23:08:00 字数 240 浏览 4 评论 0原文

我想在 Flex AreaChart 上绘图。此 AreaChart 有一个 AnnotationElement,它是 CartesianDataCanvas。 当我在此 CartesianDataCanvas 上绘制一些项目时,当该项目适合图表时,图表看起来不错。 但是,当我绘制比图表大的项目时,图表会自动调整大小并尝试将我的项目放入图表中。我不希望我的图表像这样自动调整大小,而是不显示位于图表之外的项目部分。我应该怎么办?

非常感谢, 亨利

I want to draw on a Flex AreaChart. This AreaChart has an AnnotationElement that is an CartesianDataCanvas.
When I draw some items on this CartesianDataCanvas, the chart looks good when the item fits inside the chart.
But when I draw an item that is bigger than the chart, the chart automatically resize and try to fit my item inside the chart. I dont want my chart to resize automatically like that, but rather not showing the item part lay outside the chart. What should I do?

Thank you a lot,
Henry

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无尽的现实 2024-09-24 23:08:00

手动缩放怎么样?

在画布上绘制之前,确定 AreaChart 的大小,包括宽度/百分比宽度和高度,并缩放图形以适合画布/AreaChart。

如果您想正确执行此操作,请研究此画布的下一个属性:

explicitMaxWidthpostLayoutTransformOffsets 以及有关 AreaChart & 的文档中的 setLayoutBoundsPosition () ; CartesianDataCanvas

让我们知道:)

what about scaling it manually?

before you draw it on the canvas, determine the sizes of AreaChart including width/percentWidth and same for height, and scale your graphics to fit the canvas/AreaChart.

If you want to do it right, research this canvas to next properties:

explicitMaxWidth and postLayoutTransformOffsets and this too setLayoutBoundsPosition () from documentation about AreaChart & CartesianDataCanvas

And let us know :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文