achartengine之Demo学习6——demo中没使用的方法

运行demo可以发现,它的所有chart都是可以移动,背景色为黑。。。。不过我们有时候会希望chart不动或者改变背景色等一些样式。
这节就介绍一些demo中没有使用的但有很常见的一些关于设置renderer的方法
我也是一边看帮助文件一边在学习,下面的内容会不断更新,方便自己学习和查阅

1、//设置图形不可移动
org.achartengine.renderer.XYMultipleSeriesRenderer
setPanEnabled
public void setPanEnabled(boolean enabledX, boolean enabledY)
Sets the enabled state of the pan.
Parameters:
enabledX - pan enabled on X axis
enabledY - pan enabled on Y axis

org.achartengine.renderer.DefaultRenderer
setPanEnabled
public void setPanEnabled(boolean enabled)
Sets the enabled state of the pan.
Parameters:
enabled - pan enabled



2、//设置空白区的颜色,默认为黑色
org.achartengine.renderer.XYMultipleSeriesRenderer
setMarginsColor
public void setMarginsColor(int color)
Sets the color of the margins.
Parameters:
color - the margins color



3、//是否采用背景色,false下默认chart背景色为黑色,默认false
org.achartengine.renderer.DefaultRenderer
setApplyBackgroundColor
public void setApplyBackgroundColor(boolean apply)
Sets if the background color should be applied.
Parameters:
apply - the apply flag for the background color




4、//设置chart的背景颜色,不包括空白区
//要注意的是,改变chart背景颜色之前必须要先使用3中的方法
//即 setApplyBackgroundColor(true) 
org.achartengine.renderer.DefaultRenderer
setBackgroundColor
public void setBackgroundColor(int color)
Sets the background color.
Parameters:
color - the background color


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值