Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何给柱状图的每个柱子设置单独的颜色 #26

Open
Charay opened this issue Aug 3, 2016 · 1 comment
Open

如何给柱状图的每个柱子设置单独的颜色 #26

Charay opened this issue Aug 3, 2016 · 1 comment

Comments

@Charay
Copy link

Charay commented Aug 3, 2016

如何给柱状图的每个柱子设置单独的颜色,最近项目有这样的需求,但找不到相应的入口,用barDataSet.setColor(Color.BLUE);可以给整个柱状图设置统一颜色,用barDataSet.setColors(new int[]{Color.BLUE,Color.YELLOW});或者颜色数组有多种颜色时,这些颜色完全失效,柱状图会显示固定的红色和绿色的柱子,通过观察应该是比前一个柱子增高的会显示红色,降低的会显示绿色,没办法更改。能否根据一定规则单独设置每个柱子的颜色。

@AndroidJiang
Copy link
Owner

那个颜色就是找的源码改的啊,你找到设置的地方,然后根据自己的规则,去修改一下就行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants