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

Stacked bar chart with different number of rects #744

Closed
zaplitny opened this issue Feb 8, 2016 · 1 comment
Closed

Stacked bar chart with different number of rects #744

zaplitny opened this issue Feb 8, 2016 · 1 comment

Comments

@zaplitny
Copy link

zaplitny commented Feb 8, 2016

I have daily bar chart displaying 2 bars with different number of rects inside, e.g

  • yellow, red, green on bar 1
  • red, green on bar 2

As I understand there's no way to do it right now. I tried to collect all colors into single array and set it in dataset but it gets only first colors from the array:
CGContextSetFillColorWithColor(context, dataSet.colorAt(k).CGColor)
where k is index of current bar's entry

I did quick local fix - pass array of all colors and add colorIndex increment in BarChartRenderer but it doesn't look good. What about adding colors property to BarChartDataEntry and if it's set use it instead?

@danielgindi
Copy link
Collaborator

I don't understand your problem. Look at the stacked bar demo.

@jjatie jjatie closed this as completed Apr 1, 2018
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

3 participants