AChartEngine透明背景 [英] AChartEngine transparent background
本文介绍了AChartEngine透明背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个问题。我正在与AChartEngine一个图,我想有全图的背景是透明的:
I have a problem. I'm making a graph with AChartEngine and I would like to have the background of the whole graph to be transparent:
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
(...)
renderer.setMargins(new int[]{0,0,0,0});
renderer.setApplyBackgroundColor(true);
renderer.setMarginsColor(Color.TRANSPARENT);
renderer.setBackgroundColor(Color.TRANSPARENT);
(...)
GraphicalView g = ChartFactory.getTimeChartView(this, dataset, renderer, "dd/MM");
但它不能正常工作:
But it isn't working properly:
正如你所看到的,有一个黑盒子后面出现的x标签。我究竟做错了什么?
As you can see, there is a black box appearing behind the x-labels. What am I doing wrong?
在前进,
谢谢
yellos
Thanks in advance,
yellos
推荐答案
尝试setMarginsColor(Color.argb(0×00,0×01,0×01,0×01));它看起来像有设置颜色为黑色,当一个bug透明
Try setMarginsColor(Color.argb(0x00, 0x01, 0x01, 0x01)); It looks like there's a bug when setting the color as black transparent
这篇关于AChartEngine透明背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文