安卓:achartengine - XYChart重叠轴缩放时 [英] Android:achartengine - XYChart overlap axis while zooming

查看:142
本文介绍了安卓:achartengine - XYChart重叠轴缩放时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用的LinearLayout图表AChartEngine。
我有一个利润率图表

I am charting using AChartEngine in a linearlayout. I have a margins for chart

      mRenderer.setMargins(new int[] {20, 50, 20, 20});

问题是,当我变焦的图表,它重叠轴。
如何解决呢?为什么利润率不是当我放大图表工作?

The problem is when I the zoom chart, it overlaps the axis. How to fix that? Why do margins not work when I zoom the chart?

推荐答案

发现问题。
问题是在这片code的

Found the problem. The problem is in this piece of code

mRenderer.setMarginsColor(Color.argb(0x00, 0x01, 0x01, 0x01));

我设置页边距颜色transperent,因为我希望我的背景视图可见。
所以,解决的办法是油漆边距。
该解决方案是不完美的,但它为我工作。

I set Margins color to transperent, because I want my background view to be visible. So the solution is to paint Margins. The solution is not perfect, but its works for me.

这篇关于安卓:achartengine - XYChart重叠轴缩放时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆