Flex3 折线图点太靠近边缘

发布于 2024-07-30 09:35:50 字数 319 浏览 7 评论 0原文

我有一个使用 CircleItemRenderer 的 Flex3 LineChart 组件,并且数据点被切断,因为它们太靠近边缘。 它看起来像这样:

http://img29.imageshack.us/img29/3850/ Chartx.png

正如你所看到的,左右两侧的圆圈被剪掉了。

如何使 LineSeries 区域以及水平标签变窄以适合图表区域?

谢谢!

I have a Flex3 LineChart component using an CircleItemRenderer and the datapoints are being cut off because they are too close to the edge. Here's what it looks like:

http://img29.imageshack.us/img29/3850/chartx.png

As you can see, the circles on the left and right sides are being cut off.

How can I make the LineSeries area, plus the horizontal labels, narrower so it fits in the chart area?

Thanks!

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

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

发布评论

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

评论(6

摘星┃星的人 2024-08-06 09:35:50

我遇到了同样的问题,并且能够通过将图表标签中的 ClipContent 属性设置为 false 来解决该问题。 我在 艾米的 Flex 日记 上找到了这个解决方案。

I had the same issue and was able to resolve it by setting the clipContent attribute in the chart tag to false. I found this solution on Amy's Flex Diary.

半山落雨半山空 2024-08-06 09:35:50

您可能想要在 Horizo​​ntalAxis 对象中设置 LinearAxis 的最大值和最小值。 检查 API 了解更多信息:http://livedocs.adobe .com/flex/3/langref/mx/charts/LinearAxis.html

折线图自动确定这些值以填充屏幕中的所有元素。 您可能想要更改这些值,以便图表的两侧有一些空间。

You might want to set the maximum and minimum values in your LinearAxis in the horizontalAxis object. Check the API for more information: http://livedocs.adobe.com/flex/3/langref/mx/charts/LinearAxis.html

The Line Chart determines automatically these values to fill all the elements in the screen. You might want to change these values so the graph has some space at the sides.

伤痕我心 2024-08-06 09:35:50

您还可以在horizo​​ntalAxis和verticalAxis子对象上设置padding属性...

You can set the padding property on the horizontalAxis and verticalAxis child objects as well...

快乐很简单 2024-08-06 09:35:50

我通过将类型从 LineChart 更改为 ColumnChart 来实现此目的。 我仍然拥有所有相同的轴定义,包括线系列。 结果是相同的折线图,但更集中在图表上,而不是触及边缘。 其他填充物或排水沟都不是我想要的。

I got this to work by changing the type from LineChart to ColumnChart. I still had all of the same axis definitions including Line Series. The results are the same Line graph, but more centered on the graph instead of touching the edges. None of the other padding or gutters were what I was looking for.

冷弦 2024-08-06 09:35:50

我得到了d解决方案。

  1. 在 LineChart 中创建 creationComplete 事件

  2. 编辑您想要的水平轴的填充

    e.target.horizo​​ntalAxis.padding = 0.2;

I got d solution.

  1. create creationComplete event in LineChart

  2. edit horizontalAxis's padding you want

    e.target.horizontalAxis.padding = 0.2;

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