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

Drawing value for the WholeStack only #926

Closed
A1exandre opened this issue Apr 7, 2016 · 3 comments
Closed

Drawing value for the WholeStack only #926

A1exandre opened this issue Apr 7, 2016 · 3 comments

Comments

@A1exandre
Copy link

Hi,

The Android doc points to a setDrawValuesForWholeStack property that allows us to have values drawn only for the wholestack in a StackBar chart.

The Android version also allowed to do this by setting a specific ValueFormatter to the BarChartDataSet.

Unfortunately, the ios version does not has the setDrawValuesForWholeStack and the valueformatter used for the BarChartDataSet is just a NSValueFormatter that cannot have drawForWholeStack property either.

Is there any other way to do this or is this a feature that has not been ported to ios yet?

Thanks!

Edit: If anyone has the same issue, I found a dirty fix for this by modifying the BarChartRenderer's drawvalue function. I Modified the if statement if (!dataSet.isStacked)... so that the function always behave as if the data set is not stacked even if it is.

@danielgindi
Copy link
Collaborator

There's no setDrawValuesForWholeStack in the Android api

@liuxuan30
Copy link
Member

I remember some people are asking such feature. show sum and individual

@iamZoltanVaradi
Copy link

A1exandre Good workaround! Thank You!
Let's hope they bring back the setDrawValuesForWholeStack feature. Even though they say it can be done with custom formatter, it's not true, because the chart API don't pass contextual information to it.

@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

5 participants